Add log_scale option to ChoiceParameterConfig#5235
Closed
saitcakmak wants to merge 1 commit into
Closed
Conversation
Summary: ## Summary Adds a `log_scale: bool | None = None` field to `ChoiceParameterConfig` and pipes it through `parameter_from_config` to the underlying `ChoiceParameter`. This is the Ax-side change for T276435081, which adds end-to-end support for declaring numeric (int/float) `Choice` parameters as log-scaled so that GAIN's log-log / log-linear modeling can flow through to Ax. The corresponding GAIN-side changes will stack on top of this diff. `ChoiceParameter` already supports `log_scale` with validation that values are numeric, positive, and ordered. Passing `log_scale=None` preserves Ax's existing auto-detection behavior, while an explicit `True`/`False` overrides the default — matching the existing `ChoiceParameter.__init__` semantics. Differential Revision: D109078978
|
@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109078978. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5235 +/- ##
=======================================
Coverage 96.56% 96.56%
=======================================
Files 619 619
Lines 70168 70177 +9
=======================================
+ Hits 67756 67765 +9
Misses 2412 2412 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This pull request has been merged in e8b3898. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Summary
Adds a
log_scale: bool | None = Nonefield toChoiceParameterConfigand pipes it throughparameter_from_configto the underlyingChoiceParameter.This is the Ax-side change for T276435081, which adds end-to-end support for declaring numeric (int/float)
Choiceparameters as log-scaled so that GAIN's log-log / log-linear modeling can flow through to Ax. The corresponding GAIN-side changes will stack on top of this diff.ChoiceParameteralready supportslog_scalewith validation that values are numeric, positive, and ordered. Passinglog_scale=Nonepreserves Ax's existing auto-detection behavior, while an explicitTrue/Falseoverrides the default — matching the existingChoiceParameter.__init__semantics.Differential Revision: D109078978