-
Notifications
You must be signed in to change notification settings - Fork 162
Remove utilities for MCore < 0.29 checkpointing support (not used) #322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughRemoved ModelOpt checkpoint version handling across quantization modules, plugins, and tests. Eliminated mopt_ckpt_versn properties and related propagation, version checks, and legacy state-dict load logic. Simplified replacement and restore paths. Deleted versioned checkpoint utilities and tests; test flows now save/restore without version formatting. Changes
Sequence Diagram(s)sequenceDiagram
participant User as Caller
participant QM as Quantized Model
participant TQ as TensorQuantizer
participant PT as PyTorch Loader
Note over User,PT: Previous (legacy) restore flow
User->>PT: load_state_dict(checkpoint)
activate PT
PT->>TQ: _load_from_state_dict(state, prefix,...)
Note right of TQ: Handle legacy ModelOpt versions\nmigrate buffers, set mopt_ckpt_versn,\nissue warnings
TQ-->>PT: normalized state loaded
deactivate PT
PT-->>User: load complete
sequenceDiagram
participant User as Caller
participant QM as Quantized Model
participant PT as PyTorch Loader
Note over User,PT: New restore flow
User->>PT: load_state_dict(checkpoint)
activate PT
PT->>QM: default module load path
Note right of QM: No special ModelOpt version handling\n(no mopt_ckpt_versn propagation)
PT-->>User: load complete
deactivate PT
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (8)
💤 Files with no reviewable changes (8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: realAsma <[email protected]>
21c5b22
to
eba1dae
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #322 +/- ##
==========================================
- Coverage 73.88% 73.86% -0.03%
==========================================
Files 172 172
Lines 17444 17410 -34
==========================================
- Hits 12889 12860 -29
+ Misses 4555 4550 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The internal CI went through. Approved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went trough the utils part only.
Signed-off-by: realAsma <[email protected]> Signed-off-by: Ye Yu <[email protected]>
What does this PR do?
Type of change: ? code clean up
Overview: ?
Nemo dockers have modelopt version as
0.0.0
- This causes_amax
not found warnings to be raised (which is needed only for ModelOpt <0.29) for ModelOpt >= 0.29. This warnings are causing confusion during ModelOpt restore.We no longer need this check and the version specific checkpointing. The version specific checkpointing have been removed for MCore for sometime now (probably 0.29/0.31).
This PR removes the unused code for version specific checkpointing.
Testing
unittests.
Before your PR is "Ready for review"
Summary by CodeRabbit