Skip to content

Call save_checkpoint_and_time() when saving checkpoint and compute elapsed duration for saving checkpoint before logging timer#4263

Queued
awsankur wants to merge 3 commits intoNVIDIA:mainfrom
awsankur:main
Queued

Call save_checkpoint_and_time() when saving checkpoint and compute elapsed duration for saving checkpoint before logging timer#4263
awsankur wants to merge 3 commits intoNVIDIA:mainfrom
awsankur:main

Conversation

@awsankur
Copy link
Copy Markdown

What does this PR do ?

This PR fixes an issue with OneLogger implementation in Megatron-LM, where for any pre-training or SFT job, time to save checkpoint is reported as 0 in Weights&Biases while number of checkpoints is reported correctly.

Contribution process

Pre-checks

  • I have added relevant unit tests
  • I have added relevant functional tests
  • [ x] I have added proper typing to my code Typing guidelines
  • [ x] I have added relevant documentation
  • I have run the autoformatter.sh on my PR

Code review

Feel free to message or comment the @mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!

All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.

Step 1: Mark PR as "Ready for Review"

  1. When your PR is ready, click Ready for Review.
  2. An oncall reviewer is auto-assigned and expert reviewers are notified based on your changes.
    • Some PRs may jump straight to step 2. This is determined by .github/CODEOWNERS.

⚠️ Only mark as ready once merge-conflicts are resolved and the CI is passing.
Final Review might get declined if these requirements are not fulfilled.

Step 2: Final Review

For PRs that change megatron/core, once all expert reviewers have approved, the Final Review label is applied automatically and final reviewers are assigned.

For PRs outside megatron/core, this step is skipped.

Step 3: Approved

Once all required reviewers have approved, the Approved label is applied automatically.

Merge

Any member of mcore-engineers will be able to merge your PR.

For MRs into `dev` branch The proposed review process for `dev` branch is under active discussion.

MRs are mergable after one approval by either eharper@nvidia.com or zijiey@nvidia.com.

…apsed duration for saving checkpoint before logging timer

Signed-off-by: Ankur Srivastava <your_verified_email@domain.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 12, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@awsankur awsankur marked this pull request as ready for review April 12, 2026 04:18
@awsankur awsankur requested review from a team as code owners April 12, 2026 04:18
@svcnvidia-nemo-ci svcnvidia-nemo-ci requested a review from a team April 12, 2026 04:18
@Phlip79
Copy link
Copy Markdown
Member

Phlip79 commented Apr 13, 2026

/ok to test dc0c9e5

@Phlip79
Copy link
Copy Markdown
Member

Phlip79 commented Apr 13, 2026

/claude review

Comment thread megatron/training/training.py Outdated
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@asolergi-nv
Copy link
Copy Markdown
Contributor

/ok to test f2e0b1d

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the Approved All necessary approvals have been made label Apr 16, 2026
@asolergi-nv asolergi-nv added this pull request to the merge queue Apr 17, 2026
@svcnvidia-nemo-ci
Copy link
Copy Markdown

🔄 Merge queue validation started!

You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/24575928465

@svcnvidia-nemo-ci
Copy link
Copy Markdown

🔄 Merge queue validation started!

You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/24578774508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved All necessary approvals have been made

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants