Repository navigation
docs: fix docstring parameters that do not match signatures - #48904
Merged
Merged
Conversation
- MaxTimeCriteria: the docstring prose and Args entry said 'initial_time'; the parameter is 'initial_timestamp'. - RTDetrLoss / DFineLoss: the Args blocks documented seven constructor parameters that do not exist (they are attributes built internally from config, and the matcher type was also stale); replaced with a single config entry. Follows up on huggingface#48575/huggingface#48576 in the same docstring-vs-signature lane.
Contributor
CI recapDashboard: View test results in Grafana |
Member
|
cc @stevhliu |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docstring parameters that do not match signatures
Follows up on #48575/#48576 in the same lane.
Changes
src/transformers/generation/stopping_criteria.py(MaxTimeCriteria, autodoc'd ininternal/generation_utils.md): the prose and Args entry sayinitial_time, but the parameter isinitial_timestamp(line 106).src/transformers/loss/loss_rt_detr.py(RTDetrLoss) andsrc/transformers/loss/loss_d_fine.py(DFineLoss): both docstrings documented seven constructor parameters (matcher,weight_dict,losses,alpha,gamma,eos_coef,num_classes) that don't exist —__init__(self, config)builds all of them internally fromconfig. The documented matcher type (DetrHungarianMatcher) was also stale vs the instantiatedRTDetrHungarianMatcher. Replaced each block with a singleconfigentry.AI disclosure
This PR is AI-assisted (ZCode agent, GLM), continuing my merged #48575/#48576 scope (docstring-vs-signature fixes); I am not aware of an existing open PR covering these files (checked via
gh pr list --searchon the touched paths). Each mismatch was verified by reading the signature immediately below the docstring, and the touched files byte-compile. I have personally reviewed every line.