-
Notifications
You must be signed in to change notification settings - Fork 310
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
Rename OrderedChoiceEncode => OrderedChoiceToIntegerRange #2323
Closed
Conversation
This file contains 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
facebook-github-bot
added
the
CLA Signed
Do not delete this pull request or issue due to inactivity.
label
Apr 4, 2024
This pull request was exported from Phabricator. Differential Revision: D55754487 |
mgrange1998
added a commit
to mgrange1998/Ax
that referenced
this pull request
Apr 4, 2024
) Summary: This change renames the OrderedChoiceEncode transform to one which reflects its behavior- see T182722751 for the overall task. - Adds a new "OrderedChoiceToIntegerRange" class with the logic from the original OrderedChoiceEncode - Updates OrderedChoiceEncode to inherit from DeprecatedTransformMixin and OrderedChoiceToIntegerRange - Updates the registry to support the new transform. Initially, the new classes will be decoded into the deprecated classes to maintain backwards compatibility. Once the new classes are landed, call sites will be updated to use the new class instead of the old. Differential Revision: D55754487
mgrange1998
force-pushed
the
export-D55754487
branch
from
April 4, 2024 20:02
e16cab6
to
4466f6e
Compare
This pull request was exported from Phabricator. Differential Revision: D55754487 |
Summary: This task starts the backlog task "Rename Ax transforms in terms of what they transform from and to, when it isn't clear" It has a list of transforms to have their names updated to clearer values ``` OrderedChoiceEncode -> OrderedChoiceToIntegerRange ChoiceEncode -> ChoiceToNumericChoice TaskEncode -> TaskChoiceToIntTaskChoice Cast -> Map ``` This change - Adds a "DeprecatedTransformMixin", which classes can inherit from in order to print a logging message with the deprecated transform and the new transform to update to. - Overrides the __eq__ built-in of Transform to support equality between a DeprecatedTransform(DeprecatedTransformMixin, Transform) and an equivalent Transform object. This is needed for cases where a DeprecatedTransform is saved to a sqa store, and loaded back as the equivalent renamed Transform Subsequent changes will add the new transform classes, and update the transform registry to point to the new classes instead of the old. ## Warning The warning is as follows: ``` [WARNING 04-04 09:58:45] ax.modelbridge.transforms.deprecated_transform_mixin: `DeprecatedTransform` transform has been deprecated and will be removed in a future release. Using `Transform` instead. ``` Reviewed By: mpolson64 Differential Revision: D55643016
) Summary: This change renames the OrderedChoiceEncode transform to one which reflects its behavior- see T182722751 for the overall task. - Adds a new "OrderedChoiceToIntegerRange" class with the logic from the original OrderedChoiceEncode - Updates OrderedChoiceEncode to inherit from DeprecatedTransformMixin and OrderedChoiceToIntegerRange - Updates the registry to support the new transform. Initially, the new classes will be decoded into the deprecated classes to maintain backwards compatibility. Once the new classes are landed, call sites will be updated to use the new class instead of the old. Reviewed By: mpolson64 Differential Revision: D55754487
mgrange1998
force-pushed
the
export-D55754487
branch
from
April 5, 2024 15:39
4466f6e
to
94c2133
Compare
This pull request was exported from Phabricator. Differential Revision: D55754487 |
This pull request has been merged in 60330a8. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Summary:
This change renames the OrderedChoiceEncode transform to one which reflects its behavior- see T182722751 for the overall task.
Initially, the new classes will be decoded into the deprecated classes to maintain backwards compatibility. Once the new classes are landed, call sites will be updated to use the new class instead of the old.
Differential Revision: D55754487