-
Notifications
You must be signed in to change notification settings - Fork 400
Add deprecation warnings for various inference configs #3294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Stack from ghstack (oldest at bottom): |
Summary: Adds warnings that the following configs will be moved to prototype in a future release: * `Int8DynamicActivationInt4WeightConfig` * `Int4DynamicActivationInt4WeightConfig` * `GemliteUIntXWeightOnlyConfig` * `Float8StaticActivationFloat8WeightConfig` * `UIntXWeightOnlyConfig` * `FPXWeightOnlyConfig` See #2752 for more context Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 6eec9d6 ghstack-comment-id: 3490630687 Pull-Request: #3294
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3294
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit e83eb83 with merge base 9266734 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Summary: Adds warnings that the following configs will be moved to prototype in a future release: * `Int8DynamicActivationInt4WeightConfig` * `Int4DynamicActivationInt4WeightConfig` * `GemliteUIntXWeightOnlyConfig` * `Float8StaticActivationFloat8WeightConfig` * `UIntXWeightOnlyConfig` * `FPXWeightOnlyConfig` See #2752 for more context Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 548fca9 ghstack-comment-id: 3490630687 Pull-Request: #3294
| "torchao.quantization.Int8DynamicActivationInt4WeightConfig" | ||
| ) | ||
| warnings.warn( | ||
| "`Int8DynamicActivationInt4WeightConfig` will be moving to prototype in a future release of torchao. Please see https://github.com/pytorch/ao/issues/2752 for more details." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this config can just be removed in the future in favor of Int8DynamicActivationIntXWeightConfig. Also maybe add the replacement in the warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree long term, I want to prioritize moving these out of main folder more urgently to clean up the main folder, and deleting outright is less urgent. If someone wants to own deleting outright on a tight timeline, sounds good to me!
test/quantization/test_quant_api.py
Outdated
| # Each call should have at least one warning. | ||
| # Some of them can have two warnings - one for deprecation, | ||
| # one for moving to prototype | ||
| self.assertTrue(len(_warnings) > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to assert len(_warnings) == 1 here, since we moved the warnings context manager outside the loop? E.g. if it's 2 then that means we've logged a warning each time we call the API, which could be very noisy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can fix this, we can assert for length 1 to 2. The 2nd warning is the one being added in this PR.
| "torchao.quantization.Int4DynamicActivationInt4WeightConfig" | ||
| ) | ||
| warnings.warn( | ||
| "`Int4DynamicActivationInt4WeightConfig` will be moving to prototype in a future release of torchao. Please see https://github.com/pytorch/ao/issues/2752 for more details." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know if anyone's actually using these configs? Is it moving to prototype just in case someone is still using them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving to prototype is to clean up main folder faster, and we can delete from prototype at a later time. Note that there are some internal use cases using some of these configs.
Summary: Adds warnings that the following configs will be moved to prototype in a future release: * `Int8DynamicActivationInt4WeightConfig` * `Int4DynamicActivationInt4WeightConfig` * `GemliteUIntXWeightOnlyConfig` * `Float8StaticActivationFloat8WeightConfig` * `UIntXWeightOnlyConfig` * `FPXWeightOnlyConfig` See #2752 for more context Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 2568e85 ghstack-comment-id: 3490630687 Pull-Request: #3294
* Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned]
Summary:
Adds warnings that the following configs will be moved to prototype in a
future release:
Int8DynamicActivationInt4WeightConfigInt4DynamicActivationInt4WeightConfigGemliteUIntXWeightOnlyConfigFloat8StaticActivationFloat8WeightConfigUIntXWeightOnlyConfigFPXWeightOnlyConfigSee #2752 for more context
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags: