modelscope / modelscope/ms-swift
Megatron-Swift 没法使用torch.profile,把原生megatron的功能弄丢了?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 1.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 136
Description
Checklist / 检查清单
- I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述
ValueError: remaining_argv: ['--profile', '--use-pytorch-profiler', '--profile-step-start', '5', '--profile-step-end', '6']
megatron原生的profile使能方式直接丢了吗?
How to Reproduce / 如何复现
在megatron sft的启动脚本中加入profile参数如下:
--profile \ --use-pytorch-profiler \ --profile-step-start 5 \ --profile-step-end 6
无效报错哦 @Jintao-Huang
Additional Information / 补充信息
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the Megatron SFT launch script and the argument-parsing path that reports the remaining_argv error. Reproduce with --profile, --use-pytorch-profiler, --profile-step-start 5, and --profile-step-end 6, then verify that these profiler options are accepted and profiling works as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100