Skip to content

[PyTorch] Fix backward compatibility for checkpoint loading#1868

Merged
ksivaman merged 1 commit intoNVIDIA:mainfrom
ksivaman:load_old_checkpoints
Jun 12, 2025
Merged

[PyTorch] Fix backward compatibility for checkpoint loading#1868
ksivaman merged 1 commit intoNVIDIA:mainfrom
ksivaman:load_old_checkpoints

Conversation

@ksivaman
Copy link
Copy Markdown
Member

Description

Fix loading checkpoints created before #1799.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

  • Check if state is None before proceeding to load.

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
@ksivaman ksivaman requested a review from timmoon10 June 11, 2025 18:49
@ksivaman ksivaman added the 2.5.0 label Jun 11, 2025
Copy link
Copy Markdown
Collaborator

@timmoon10 timmoon10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

This bug was causing some checkpointing tests to fail in Megatron-LM.

@ksivaman
Copy link
Copy Markdown
Member Author

/te-ci pytorch

@ksivaman ksivaman merged commit 0efc7da into NVIDIA:main Jun 12, 2025
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants