Add GenerationStrategy.fit() and make maybe_transition_to_next_node private (#4922)#4922
Closed
sdaulton wants to merge 1 commit intofacebook:mainfrom
Closed
Add GenerationStrategy.fit() and make maybe_transition_to_next_node private (#4922)#4922sdaulton wants to merge 1 commit intofacebook:mainfrom
sdaulton wants to merge 1 commit intofacebook:mainfrom
Conversation
1b714d8 to
0666bd6
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Mar 4, 2026
…nter GN when trials are provided (facebook#4922) Summary: see title. This important for using a new GS on an experiment with data in model-based analyses. This adds support for * skipping the center GN when trials with data are provided * Transitioning the GS when possible when extracting the adapter in analyses (important for fast-forwarding the GS for an experiment with data). Differential Revision: D93804600
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Mar 4, 2026
…nter GN when trials are provided (facebook#4922) Summary: Pull Request resolved: facebook#4922 see title. This important for using a new GS on an experiment with data in model-based analyses. This adds support for * skipping the center GN when trials with data are provided * Transitioning the GS when possible when extracting the adapter in analyses (important for fast-forwarding the GS for an experiment with data). Differential Revision: D93804600
0666bd6 to
135910c
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Mar 4, 2026
…nter GN when trials are provided (facebook#4922) Summary: Pull Request resolved: facebook#4922 see title. This important for using a new GS on an experiment with data in model-based analyses. This adds support for * skipping the center GN when trials with data are provided * Transitioning the GS when possible when extracting the adapter in analyses (important for fast-forwarding the GS for an experiment with data). Differential Revision: D93804600
135910c to
f5f9a12
Compare
f5f9a12 to
e5b359c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4922 +/- ##
==========================================
- Coverage 96.30% 96.30% -0.01%
==========================================
Files 611 611
Lines 67534 67572 +38
==========================================
+ Hits 65040 65073 +33
- Misses 2494 2499 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e5b359c to
6a095b7
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Mar 24, 2026
…rivate (facebook#4922) Summary: Add a public ``GenerationStrategy.fit(experiment, data)`` method that encapsulates the transition-then-fit pattern. This replaces ad-hoc calls to ``maybe_transition_to_next_node`` + ``current_node._fit`` that were scattered across analysis utils, AxClient, and other callers. ``fit()`` transitions to the appropriate node based on experiment state (e.g. skipping initialization nodes, selecting TL vs non-TL nodes), fits all GeneratorSpecs on that node, and returns the fitted Adapter. ``maybe_transition_to_next_node`` is made private (``_maybe_transition_to_next_node``) per reviewer feedback to limit external callers of GS internals. The new looping version (which advances through multiple nodes) replaces the old single-step ``_maybe_transition_to_next_node``. Also adds support for skipping the CenterGenerationNode when trials with data are already present (``use_existing_trials_for_initialization``). Reviewed By: mgarrard Differential Revision: D93804600
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Mar 24, 2026
…rivate (facebook#4922) Summary: Pull Request resolved: facebook#4922 Add a public ``GenerationStrategy.fit(experiment, data)`` method that encapsulates the transition-then-fit pattern. This replaces ad-hoc calls to ``maybe_transition_to_next_node`` + ``current_node._fit`` that were scattered across analysis utils, AxClient, and other callers. ``fit()`` transitions to the appropriate node based on experiment state (e.g. skipping initialization nodes, selecting TL vs non-TL nodes), fits all GeneratorSpecs on that node, and returns the fitted Adapter. ``maybe_transition_to_next_node`` is made private (``_maybe_transition_to_next_node``) per reviewer feedback to limit external callers of GS internals. The new looping version (which advances through multiple nodes) replaces the old single-step ``_maybe_transition_to_next_node``. Also adds support for skipping the CenterGenerationNode when trials with data are already present (``use_existing_trials_for_initialization``). Reviewed By: mgarrard Differential Revision: D93804600
6a095b7 to
87c7504
Compare
…rivate (facebook#4922) Summary: Add a public ``GenerationStrategy.fit(experiment, data)`` method that encapsulates the transition-then-fit pattern. This replaces ad-hoc calls to ``maybe_transition_to_next_node`` + ``current_node._fit`` that were scattered across analysis utils, AxClient, and other callers. ``fit()`` transitions to the appropriate node based on experiment state (e.g. skipping initialization nodes, selecting TL vs non-TL nodes), fits all GeneratorSpecs on that node, and returns the fitted Adapter. ``maybe_transition_to_next_node`` is made private (``_maybe_transition_to_next_node``) per reviewer feedback to limit external callers of GS internals. The new looping version (which advances through multiple nodes) replaces the old single-step ``_maybe_transition_to_next_node``. Also adds support for skipping the CenterGenerationNode when trials with data are already present (``use_existing_trials_for_initialization``). Reviewed By: mgarrard Differential Revision: D93804600
87c7504 to
3ec2029
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Mar 25, 2026
…rivate (facebook#4922) Summary: Add a public ``GenerationStrategy.fit(experiment, data)`` method that encapsulates the transition-then-fit pattern. This replaces ad-hoc calls to ``maybe_transition_to_next_node`` + ``current_node._fit`` that were scattered across analysis utils, AxClient, and other callers. ``fit()`` transitions to the appropriate node based on experiment state (e.g. skipping initialization nodes, selecting TL vs non-TL nodes), fits all GeneratorSpecs on that node, and returns the fitted Adapter. ``maybe_transition_to_next_node`` is made private (``_maybe_transition_to_next_node``) per reviewer feedback to limit external callers of GS internals. The new looping version (which advances through multiple nodes) replaces the old single-step ``_maybe_transition_to_next_node``. Also adds support for skipping the CenterGenerationNode when trials with data are already present (``use_existing_trials_for_initialization``). Reviewed By: mgarrard Differential Revision: D93804600
|
This pull request has been merged in 168516b. |
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:
Add a public
GenerationStrategy.fit(experiment, data)method thatencapsulates the transition-then-fit pattern. This replaces ad-hoc calls
to
maybe_transition_to_next_node+current_node._fitthat werescattered across analysis utils, AxClient, and other callers.
fit()transitions to the appropriate node based on experiment state(e.g. skipping initialization nodes, selecting TL vs non-TL nodes),
fits all GeneratorSpecs on that node, and returns the fitted Adapter.
maybe_transition_to_next_nodeis made private(
_maybe_transition_to_next_node) per reviewer feedback to limitexternal callers of GS internals. The new looping version (which
advances through multiple nodes) replaces the old single-step
_maybe_transition_to_next_node.Also adds support for skipping the CenterGenerationNode when trials
with data are already present (
use_existing_trials_for_initialization).Reviewed By: mgarrard
Differential Revision: D93804600