Skip to content

[bugfix] fix typo and stray characters in base argument docstrings - #9985

Merged
hjh0119 merged 1 commit into
modelscope:mainfrom
BingH225:fix/arg-docstring-typos
Aug 25, 2026
Merged

hjh0119 merged 1 commit into
modelscope:mainfrom
BingH225:fix/arg-docstring-typos

Conversation

@BingH225

Copy link
Copy Markdown
Contributor

Description

Three small correctness fixes in swift/arguments/base_args/:

  1. data_args.py: remove_unused_columns docstring says GPRO, should be GRPO.
    This is the only occurrence of GPRO in the repository.
  2. model_args.py: _init_torch_dtype docstring 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.
  3. model_args.py: the "model is None" ValueError message contains a stray
    backtick 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}.py passes
  • ast.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 matches
  • ruff / yapf report no new findings (identical count to the unmodified baseline)

AI assistance was used to locate these issues; I reviewed every changed line.

- 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
hjh0119 merged commit a969914 into modelscope:main Aug 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants