Avoid overwriting AutoTP-related settings when using DeepSpeed configuration files. - #9691
Conversation
There was a problem hiding this comment.
Code Review
This pull request modifies the initialization of DeepSpeed configuration parameters in swift/arguments/sft_args.py. The reviewer identified a potential KeyError that could occur if the 'tensor_parallel' or 'zero_optimization' keys are not pre-defined in the self.deepspeed dictionary, and suggested using setdefault to safely initialize these keys and prevent runtime crashes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@hjh0119 Could you please take a look at this PR? Thanks! |
|
Please update based on Gemini's suggestions. |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
done |
…iguration files. (#9691)
PR type
PR information
Avoid overwriting AutoTP-related settings when using DeepSpeed configuration files.
For example, if
partition_configis configured in the config file, it will be overridden if the--deepspeed_autotp_sizeargument is passed in the training script.Experiment results
Paste your experiment result here(if needed).