Repository navigation
docs: remove phantom parameters from docstrings - #48576
Merged
Merged
Conversation
- utils/quantization_config.py to_json_file documented a use_diff parameter that the override does not accept (copied from PretrainedConfig.to_json_file) - masking_utils.py: three functions documented a cache_position parameter marked 'Deprecated and unused' that is not in any of their signatures (left behind when the parameter was removed)
Contributor
CI recapDashboard: View test results in Grafana |
vasqu
enabled auto-merge
September 7, 2026 13:20
|
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. |
sbucaille
pushed a commit
to sbucaille/transformers
that referenced
this pull request
Sep 16, 2026
- utils/quantization_config.py to_json_file documented a use_diff parameter that the override does not accept (copied from PretrainedConfig.to_json_file) - masking_utils.py: three functions documented a cache_position parameter marked 'Deprecated and unused' that is not in any of their signatures (left behind when the parameter was removed)
This was referenced Sep 17, 2026
pull Bot
pushed a commit
to sandeepyadav1478/transformers
that referenced
this pull request
Sep 18, 2026
…ace#48904) - 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.
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-only fixes removing documented parameters that the functions do not accept:
src/transformers/utils/quantization_config.pyto_json_file: documenteduse_diff (bool, …)— this override takes onlyjson_file_pathand always writes the full dict (the docstring was copied fromPretrainedConfig.to_json_file, which does acceptuse_diff). Removed the stale entry.src/transformers/masking_utils.py:create_causal_mask,create_sliding_window_causal_maskandcreate_chunked_causal_maskeach documentedcache_position (torch.Tensor): Deprecated and unused— the parameter was removed from all three signatures but the docstring lines were left behind. Removed all three.Docstrings only — no code change.