Fix FqnToConfig module skipping for _default and regex modules#3877
Conversation
🔗 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 FailuresAs of commit 4b75086 with merge base 475f336 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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:
b06751c to
4b75086
Compare
| * 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 |
There was a problem hiding this comment.
we should update docs to talk about this as well I think?
also any plans to deprecate _default?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Summary:
Fixes #3867. We were missing handling None appropriately like we do for exact fqn match earlier in the function.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags: