Repository navigation
Conversation
Signed-off-by: Xin He <xin3.he@intel.com>
xin3he
requested review from
chensuyue and
lvliang-intel
and
a lite review from Copilot
and removed request for
Copilot
October 20, 2026 07:50
Copilot stopped reviewing on behalf of
xin3he due to an error
October 20, 2026 07:53
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Three moderate issues remain in source-config handling and in-place saves.
1 open issue
What changed in this PR
Preserves source config.json during model export while updating quantization metadata and adding tests.
Changes:
- Adds local/remote source-config preservation with fallback behavior.
- Integrates preservation into
save_model. - Adds coverage for preservation and fallback scenarios.
| File | Summary | Findings |
|---|---|---|
auto_round/export/utils.py |
Implements source configuration loading and preservation. | Three moderate issues: JSON source files are treated as Hub IDs (1 vote); stale quantization_config is retained when removed (2 votes); in-place saves can overwrite the source before preservation (1 vote). |
test/unit/common/export/test_export_utils.py |
Tests source configuration preservation and fallback cases. | No findings. |
Review effort: Lite
Collaborator
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
n1ck-guo
approved these changes
Oct 22, 2026
n1ck-guo
left a comment
Contributor
There was a problem hiding this comment.
LGTM.
Should we extend this algorithm by incorporating some of the code from save_config_artifact? For example,when exception, try model.save_config / config.save_pretrained as line 90-111
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.

Description
Sometimes, the saved config is not suitable for re-loading. we should avoid this issue ahead.
Type of Change
Refactor
Related Issues
Fixes or relates to #2521
Checklist Before Submitting
/azp run Unit-Test-CUDA-AutoRound.