Skip to content

add parameter constraints while adding new parameters (#5023)#5023

Closed
bletham wants to merge 1 commit intofacebook:mainfrom
bletham:export-D96522400
Closed

add parameter constraints while adding new parameters (#5023)#5023
bletham wants to merge 1 commit intofacebook:mainfrom
bletham:export-D96522400

Conversation

@bletham
Copy link
Copy Markdown
Contributor

@bletham bletham commented Mar 13, 2026

Summary:

AxClient and Experiment each have a method for adding parameters to the experiment (added in D93766951). In settings where we are dealing with constrained parameters, we need a similarly convenient interface for adding the constraints on those parameters. I think the cleanest approach is to add constraints as a kwarg to the existing method, which is what is done here.

I also fix a bug in the AxClient add parameters interface where the docstring says "status_quo_values: Optional parameter values for the new parameters to use in the status quo (baseline) arm, if one is defined. If None, the backfill values will be used for the status quo." but didn't use the backfill. The Experiment method this subsequently calls requiers status_quo_values, so this was actually producing an error if status_quo_values were not provided.

Differential Revision: D96522400

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 13, 2026

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

@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 13, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.30%. Comparing base (0d3535e) to head (7929527).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5023   +/-   ##
=======================================
  Coverage   96.29%   96.30%           
=======================================
  Files         611      611           
  Lines       67338    67391   +53     
=======================================
+ Hits        64846    64899   +53     
  Misses       2492     2492           

☔ View full report in Codecov by Sentry.
📢 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 changed the title add parameter constraints while adding new parameters add parameter constraints while adding new parameters (#5023) Mar 23, 2026
bletham added a commit to bletham/Ax that referenced this pull request Mar 23, 2026
Summary:

AxClient and Experiment each have a method for adding parameters to the experiment (added in D93766951). In settings where we are dealing with constrained parameters, we need a similarly convenient interface for adding the constraints on those parameters. I think the cleanest approach is to add constraints as a kwarg to the existing method, which is what is done here.

I also fix a bug in the AxClient add parameters interface where the docstring says "status_quo_values: Optional parameter values for the new parameters to use in the status quo (baseline) arm, if one is defined. If None, the backfill values will be used for the status quo." but didn't use the backfill. The Experiment method this subsequently calls requiers status_quo_values, so this was actually producing an error if status_quo_values were not provided.

Differential Revision: D96522400
Summary:
Pull Request resolved: facebook#5023

AxClient and Experiment each have a method for adding parameters to the experiment (added in D93766951). In settings where we are dealing with constrained parameters, we need a similarly convenient interface for adding the constraints on those parameters. I think the cleanest approach is to add constraints as a kwarg to the existing method, which is what is done here.

I also fix a bug in the AxClient add parameters interface where the docstring says "status_quo_values: Optional parameter values for the new parameters to use in the status quo (baseline) arm, if one is defined. If None, the backfill values will be used for the status quo." but didn't use the backfill. The Experiment method this subsequently calls requiers status_quo_values, so this was actually producing an error if status_quo_values were not provided.

Differential Revision: D96522400
@meta-codesync meta-codesync Bot closed this in b4652b1 Mar 23, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 23, 2026

This pull request has been merged in b4652b1.

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. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants