Skip to content

Conversation

@lena-kashtelyan
Copy link
Contributor

Summary:
Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

  1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to SearchSpace to be co-located with the rest of the disabled parameter logic.
  2. Reaps GenerationStrategy.DEFAULT_N, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an ExperimentDesign object.
  3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Differential Revision:
D80175141

Privacy Context Container: L1307644

@meta-codesync
Copy link

meta-codesync bot commented Dec 25, 2025

@lena-kashtelyan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D80175141.

@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 25, 2025
lena-kashtelyan pushed a commit to lena-kashtelyan/Ax that referenced this pull request Dec 25, 2025
Summary:

Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic.
2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object.
3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Differential Revision:
D80175141

Privacy Context Container: L1307644
lena-kashtelyan pushed a commit to lena-kashtelyan/Ax that referenced this pull request Dec 26, 2025
Summary:

Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic.
2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object.
3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Differential Revision:
D80175141

Privacy Context Container: L1307644
lena-kashtelyan pushed a commit to lena-kashtelyan/Ax that referenced this pull request Dec 26, 2025
Summary:

Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic.
2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object.
3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Differential Revision:
D80175141

Privacy Context Container: L1307644
@lena-kashtelyan lena-kashtelyan force-pushed the export-D80175141 branch 2 times, most recently from 85b2933 to c57ac71 Compare December 26, 2025 15:47
lena-kashtelyan pushed a commit to lena-kashtelyan/Ax that referenced this pull request Dec 26, 2025
Summary:

Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic.
2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object.
3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Differential Revision:
D80175141

Privacy Context Container: L1307644
lena-kashtelyan pushed a commit to lena-kashtelyan/Ax that referenced this pull request Dec 26, 2025
Summary:

Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic.
2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object.
3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Differential Revision:
D80175141

Privacy Context Container: L1307644
@codecov-commenter
Copy link

codecov-commenter commented Dec 26, 2025

Codecov Report

❌ Patch coverage is 98.87640% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.71%. Comparing base (c0edb14) to head (5c1ebdf).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ax/generation_strategy/generation_node.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4704      +/-   ##
==========================================
- Coverage   96.71%   96.71%   -0.01%     
==========================================
  Files         582      582              
  Lines       60713    60735      +22     
==========================================
+ Hits        58717    58738      +21     
- Misses       1996     1997       +1     

☔ 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.

lena-kashtelyan pushed a commit to lena-kashtelyan/Ax that referenced this pull request Dec 26, 2025
Summary:

Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic.
2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object.
3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Differential Revision:
D80175141

Privacy Context Container: L1307644
lena-kashtelyan pushed a commit to lena-kashtelyan/Ax that referenced this pull request Dec 27, 2025
Summary:

Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic.
2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object.
3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Reviewed By: saitcakmak

Differential Revision:
D80175141

Privacy Context Container: L1307644
Lena Kashtelyan added 2 commits December 27, 2025 10:04
Summary:

When `gen_single_trial` does not call `gen`, we have a few problems, in order of importance:

1. Forgetting to specify `pending_observations` to `gen_single_trial` will result in no `pending_observations` use. This is different from the behavior in the main `gen`, so it's a huge gotcha and could already be causing silent bugs.
2. Unnecessary bifurcation, meaning that more behaviors like 1) could encroach in the future.
3. Repeated operations.

Reviewed By: saitcakmak

Differential Revision:
D80174582

Privacy Context Container: L1307644
Summary:

Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic.
2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object.
3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Reviewed By: saitcakmak

Differential Revision:
D80175141

Privacy Context Container: L1307644
lena-kashtelyan pushed a commit to lena-kashtelyan/Ax that referenced this pull request Dec 27, 2025
Summary:

Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)

This diff:

1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic.
2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object.
3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within.

Reviewed By: saitcakmak

Differential Revision:
D80175141

Privacy Context Container: L1307644
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 meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants