Repository navigation
[bugfix] fix typo and stray characters in base argument docstrings - #9985
Merged
Merged
Conversation
- data_args.py: GPRO -> GRPO in the remove_unused_columns docstring (only occurrence of GPRO in the repository) - model_args.py: _init_torch_dtype docstring started with four quotes, so the extra quote leaked into the docstring body - model_args.py: drop a stray backtick from the user-facing "Please set --model <model_id_or_path>" error message Co-authored-by: Claude <noreply@anthropic.com>
hjh0119
approved these changes
Aug 25, 2026
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.
Description
Three small correctness fixes in
swift/arguments/base_args/:data_args.py:remove_unused_columnsdocstring saysGPRO, should beGRPO.This is the only occurrence of
GPROin the repository.model_args.py:_init_torch_dtypedocstring starts with four quotes (""""),so the leading
"becomes part of the docstring body.ast.get_docstring()returns'"If torch_dtype is None, ...'before the fix.model_args.py: the "model is None"ValueErrormessage contains a straybacktick after
<model_id_or_path>, which is shown to end users.Test
Docstring / message text only, no behavior change.
python -m py_compile swift/arguments/base_args/{data_args,model_args}.pypassesast.get_docstring(_init_torch_dtype)now returns'If torch_dtype is None, find a proper dtype by the config.json/GPU'grep -rn "GPRO"returns 0 matchesruff/yapfreport no new findings (identical count to the unmodified baseline)AI assistance was used to locate these issues; I reviewed every changed line.