Repository navigation
Conversation
A checkpoint saved after calibration but before scoring restores candidate_stats as a plain dict (weights-only load drops the defaultdict), so scoring finished and then initialize_candidate_stats raised KeyError, losing the scores. Create each entry explicitly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: weimingc <17592131+meenchen@users.noreply.github.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3169 +/- ##
==========================================
- Coverage 80.35% 80.34% -0.01%
==========================================
Files 675 676 +1
Lines 77281 77380 +99
==========================================
+ Hits 62099 62173 +74
- Misses 15182 15207 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
What does this PR do?
Type of change: Bug fix
auto_quantizesaves a checkpoint after calibration, before scoring. Resuming from it loadscandidate_statswith a weights-only load, which returns a plaindictinstead of thedefaultdict(dict)the searcher creates. Scoring then runs to the end andinitialize_candidate_statsraisesKeyErroron the first group, losing all scores. This hit a preempted 7-format sub-4-bit search on a 74B MoE after ~8 h of scoring.The fix creates each group's entry explicitly (
setdefault) before writing its formats and scores.Independent of the sub-4-bit series (#3154 → #3151 → #3152 → #3153 → #3155); based on
main.Testing
test_auto_quantize_calibration_only_checkpoint_validates_module_search_spaces: it now resumes a copy of the calibration-only checkpoint and asserts every group'scandidate_statsentry. Fails withKeyErrorwithout the fix; passes with it.tests/unit/torch/quantization/test_autoquant.py: 79 passed.Before your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True,torch.load(..., weights_only=False),pickle, etc.).CONTRIBUTING.md: N/AAdditional Information
Found while running the sub-4-bit AutoQuantize series (OMNIML-6370).
🤖 Generated with Claude Code