Skip to content

Add log_scale option to ChoiceParameterConfig#5235

Closed
saitcakmak wants to merge 1 commit into
facebook:mainfrom
saitcakmak:export-D109078978
Closed

Add log_scale option to ChoiceParameterConfig#5235
saitcakmak wants to merge 1 commit into
facebook:mainfrom
saitcakmak:export-D109078978

Conversation

@saitcakmak

Copy link
Copy Markdown
Contributor

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

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
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 18, 2026
@meta-codesync

meta-codesync Bot commented Jun 18, 2026

Copy link
Copy Markdown

@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109078978.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.56%. Comparing base (9bd6ec8) to head (fb97090).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@meta-codesync meta-codesync Bot closed this in e8b3898 Jun 22, 2026
@meta-codesync meta-codesync Bot added the Merged label Jun 22, 2026
@meta-codesync

meta-codesync Bot commented Jun 22, 2026

Copy link
Copy Markdown

This pull request has been merged in e8b3898.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants