Fix invalid group reference in revert_checkpoint_conversion_mapping#2035
Open
A-S-Manoj wants to merge 1 commit into
Open
Fix invalid group reference in revert_checkpoint_conversion_mapping#2035A-S-Manoj wants to merge 1 commit into
A-S-Manoj wants to merge 1 commit into
Conversation
…ntel#2028) Signed-off-by: A Sivasubramanian Manoj <sivasubramanianmanoj2310533@ssn.edu.in>
|
Commenter does not have sufficient privileges for PR 2035 in repo intel/auto-round |
Contributor
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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
revert_checkpoint_conversion_mappingunconditionally stripped the capturegroup out of each source regex pattern, even when the corresponding target
pattern still referenced that group via a backreference (e.g.
\1).This is fine for mappings where the target is a plain string, but
transformers-5.x
checkpoint_conversion_mappings (e.g. Qwen3.5/3.6-MoE)include entries like:
Stripping the group here leaves
\1in the target dangling, andre.subn(source_pattern, target_pattern, name)raises:The fix only strips the capture group when the target pattern does not
backreference it, so patterns that rely on the captured suffix keep working
while the existing bare-tensor-suffix handling is unaffected.
Type of Change
Bug fix
Related Issues
Fixes #2028
Checklist Before Submitting
/azp run Unit-Test-CUDA-AutoRound.