Skip to content

Fix FqnToConfig module skipping for _default and regex modules#3877

Merged
jcaip merged 1 commit into
mainfrom
jcaip/fix-fqn-none-error
Feb 13, 2026
Merged

Fix FqnToConfig module skipping for _default and regex modules#3877
jcaip merged 1 commit into
mainfrom
jcaip/fix-fqn-none-error

Conversation

@jcaip

@jcaip jcaip commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Summary:

Fixes #3867. We were missing handling None appropriately like we do for exact fqn match earlier in the function.

Test Plan:

pytest test/quantization/test_quant_api.py -k
test_fqn_to_config_regex_skip

Reviewers:

Subscribers:

Tasks:

Tags:

@pytorch-bot

pytorch-bot Bot commented Feb 12, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3877

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 4b75086 with merge base 475f336 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 12, 2026
Summary:

Fixes #3867. We were missing handling None appropriately like we do for
exact fqn match earlier in the function.

Test Plan:

```
pytest test/quantization/test_quant_api.py -k
test_fqn_to_config_regex_skip
```

Reviewers:

Subscribers:

Tasks:

Tags:
@jcaip jcaip force-pushed the jcaip/fix-fqn-none-error branch from b06751c to 4b75086 Compare February 12, 2026 20:01
@jcaip jcaip added the topic: bug fix Use this tag for PRs that fix bugs label Feb 12, 2026
@jcaip jcaip requested a review from jerryzh168 February 12, 2026 20:03
* regex for module names, must start with `re:`, e.g. `re:language\.layers\..+\.q_proj`,
whichever regex fully matches the module fqn first will be applied
(order of keys for dictionary are kept consistent since we are using OrderedDict)
* "_default", fallback if no match for all previous keys

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should update docs to talk about this as well I think?

also any plans to deprecate _default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was a bug with the actual behavior not matching the documented behavior, now we match the docs, so they shouldn't need to be updated.

also any plans to deprecate _default?

Yeah, planning to do this for 0.17 release.

Also should I mark this bc-breaking? top level-api behavior changed but it was the wrong behavior in the first place.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

oh I see. I think it's fine to say bug fix then. We are also planning to deprecate these flags and just use module: training / module: inference / module: qat flags that only capture important commits

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we still want bc-breaking as well though, right? maybe not as top-leve module but would be good to be able to tag bc-breaking prs.

@jerryzh168 jerryzh168 added the module: inference quantize_ api inference flow label Feb 12, 2026
@jcaip jcaip merged commit 757d896 into main Feb 13, 2026
20 of 21 checks passed
@jerryzh168 jerryzh168 added module: core changes affecting multiple modules, e.g. base config/tensor, observers, quant ops and removed module: inference quantize_ api inference flow labels Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: core changes affecting multiple modules, e.g. base config/tensor, observers, quant ops topic: bug fix Use this tag for PRs that fix bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FqnToConfig doesn't skip some modules when set _default.

2 participants