fix(debug): auto-append rollout_id/rank in save_debug_train_data path template#1922
Open
wlf-darkmatter wants to merge 3 commits into
Open
fix(debug): auto-append rollout_id/rank in save_debug_train_data path template#1922wlf-darkmatter wants to merge 3 commits into
wlf-darkmatter wants to merge 3 commits into
Conversation
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.
说明
使用 --save-debug-train-data 保存训练调试数据时,若路径模板未包含
{rollout_id}或{rank},多次保存会覆盖同一文件,导致调试数据丢失。本 PR 在保存前自动补全缺失占位符并打出 warning,同时抽出resolve_debug_train_data_path便于维护与测试。常见配置如
{train_data_dir}/{rollout_id}.pt只区分 rollout,未区分分布式 rank;在 Megatron / 多 GPU 训练下,多个进程会写入同一路径。此前 str.format(rollout_id=..., rank=...) 对未出现的占位符不起作用,问题不易察觉。更改内容
slime/utils/train_dump_utils.py用 _REQUIRED_KEYS 集中管理必需占位符。
slime/utils/arguments.py