Repository navigation
Reject unsafe sharded cyclic dataloader resumes - #7648
Silas-Zeng wants to merge 2 commits into
Conversation
Refresh the PR branch onto the current mainline and preserve the cyclic dataloader resume validation, metadata compatibility, and regression tests. Signed-off-by: HR-zengzzz <hrzeng123456@gmail.com>
Refresh the PR tree to the current mainline and preserve the cyclic dataloader resume validation, metadata compatibility, and regression tests. Signed-off-by: HR-zengzzz <hrzeng123456@gmail.com>
a1a582a to
6688a16
Compare
6688a16 to
a1a582a
Compare
|
@Silas-Zeng The branch includes ~9 unrelated upstream commits (biggest structural issue). Of the 14 commits in this PR, only 5 are from you. The rest are merged mainline commits: MXFP8 via MFSDP adapter, HybridStack residuals, MIMO fixes, DCP V2, SSM fusion tests, GTP teardown fix, Docker parallelization. The total diff is +3,537/−279 lines, but the actual fix is almost certainly <100 lines touching checkpointing.py and test_checkpointing.py. This inflates the review surface dramatically and makes it hard to audit what the PR actually changes. The branch should be rebased onto current main with only the fix commits, or at minimum the maintainers should review only the your commits directly. |
Signed-off-by: svcnvidia-nemo-ci <svcnvidia-nemo-ci@nvidia.com>
9808899 to
7483a59
Compare
|
🛠️ Claude fix commit
What changed Files changed by Claude
Why DCO Sanitized and posted by |
|
/ok to test 7483a59 |
|
❌ Claude fix stopped because exact-SHA CI did not complete in time. View exact-SHA CI. |
|
Thanks for the fixes. The Claude workflow timed out waiting for CI on 7483a59. Run 36857019494 is still waiting at cicd-wait-in-queue, with a pending deployment for the test environment; lint has passed. @dimapihtar, could you check what is needed for the CI run to proceed? |
|
Hi @dimapihtar @guihong-nv @wujingyue, thanks for enabling CI for these fixes. The CICD runs for #7648 and #7649 have now passed. Could you help route these two PRs to the appropriate code owner for review? They address repeated or skipped samples when resuming cyclic dataloaders after a DP-size change. I'm happy to provide any additional validation needed. Thanks for your time! |
Problem
With
cyclicdataloading and data sharding enabled, resuming after a data-parallel size change can silently repeat and skip samples because the sampler's buckets and resume offset depend on the effective DP size.Fix
Persist explicit cyclic dataloader metadata in checkpoint arguments alongside the consumed sample count: the effective dataloader DP size and the sharding mode. On a normal resume, validate that metadata before adopting the checkpoint's training progress and fail clearly when the sharded layout cannot be preserved. Older checkpoints fall back to their existing DP arguments for compatibility; finetune and release loads keep their existing behavior.
Validation
python -m py_compile megatron/training/checkpointing.py tests/unit_tests/test_checkpointing.pygit diff --checkpytest -q tests/unit_tests/test_checkpointing.py— 47 passed on NVIDIA RTX 5090 32GB, CUDA 12.8, PyTorch 2.8.0+cu128, Triton 3.4.0, Python 3.12.3.Fixes #7645