Re-export Q_ANNOTATION_KEY from quantizer annotators package#18063
Re-export Q_ANNOTATION_KEY from quantizer annotators package#18063meta-codesync[bot] merged 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18063
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 1 Pending, 1 Unrelated FailureAs of commit 7b6883e with merge base 7b5c60d ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@manuelcandales has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95862010. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
This PR aims to address breakages caused by refactoring Qualcomm quantizer annotators into a package, and updates example code to import quantization types/helpers from their new locations.
Changes:
- Update
fastvit.pyto importQuantizationConfigfromqconfigandQuantizationSpecdirectly fromtorchao. - Update
custom_ops_1.pyto import_is_annotatedfromexecutorch.backends.qualcomm.quantizer.rulesinstead of...quantizer.annotators.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/qualcomm/oss_scripts/fastvit.py | Adjusts quantization-related imports to match the post-refactor module layout. |
| examples/qualcomm/custom_op/custom_ops_1.py | Fixes the import path for _is_annotated used by the custom-op annotation example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| from executorch.backends.qualcomm.quantizer.qconfig import ( | ||
| _derived_bias_quant_spec, | ||
| MovingAverageMinMaxObserver, | ||
| QuantizationConfig, | ||
| ) | ||
|
|
||
| from executorch.backends.qualcomm.quantizer.quantizer import QuantDtype | ||
| from torchao.quantization.pt2e.quantizer import QuantizationSpec | ||
| from executorch.backends.qualcomm.serialization.qc_schema import ( |
There was a problem hiding this comment.
PR title/description indicate restoring downstream import of Q_ANNOTATION_KEY from executorch.backends.qualcomm.quantizer.annotators, but that package’s annotators/__init__.py is still empty in this change set, so downstream imports will still fail. Please re-export Q_ANNOTATION_KEY (and ideally include it in __all__) from backends/qualcomm/quantizer/annotators/__init__.py to actually fix the reported type-checking break.
…#18063) Summary: D95244673 refactored `annotators.py` into a package `annotators/` but left `__init__.py` empty, breaking downstream imports of `Q_ANNOTATION_KEY` from `executorch.backends.qualcomm.quantizer.annotators`. This fixes type-checking failures. Reviewed By: Gasoonjia Differential Revision: D95862010
418b779 to
7b6883e
Compare
Summary:
D95244673 refactored
annotators.pyinto a packageannotators/butleft
__init__.pyempty, breaking downstream imports ofQ_ANNOTATION_KEYfromexecutorch.backends.qualcomm.quantizer.annotators.This fixes type-checking failures.
Reviewed By: Gasoonjia
Differential Revision: D95862010