Scheduler updates experiment status from generation strategy#4891
Closed
CristianLara wants to merge 4 commits intofacebook:mainfrom
Closed
Scheduler updates experiment status from generation strategy#4891CristianLara wants to merge 4 commits intofacebook:mainfrom
CristianLara wants to merge 4 commits intofacebook:mainfrom
Conversation
|
@CristianLara has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87589267. |
c71719e to
5b61d6e
Compare
CristianLara
added a commit
to CristianLara/Ax
that referenced
this pull request
Feb 11, 2026
…k#4891) Summary: Connect the experiment lifecycle tracking system to the Ax Scheduler (Orchestrator), enabling automatic experiment status updates based on which optimization phase the generation strategy is in. Key Changes 🔧 1. Orchestrator (orchestrator.py): After generating new trials, extracts suggested experiment status from generator runs and updates experiment.status 2. DB Persistence (save.py + with_db_settings_base.py): Added update_experiment_status() function and wired it to save status changes to DB after trial generation 3. Tests: Added test_generate_candidates_updates_experiment_status() to verify the whole flow works Differential Revision: D87589267
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4891 +/- ##
==========================================
+ Coverage 96.79% 96.80% +0.01%
==========================================
Files 595 595
Lines 62841 62949 +108
==========================================
+ Hits 60826 60937 +111
+ Misses 2015 2012 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5b61d6e to
ac4a2a0
Compare
CristianLara
added a commit
to CristianLara/Ax
that referenced
this pull request
Feb 13, 2026
…k#4891) Summary: Connect the experiment lifecycle tracking system to the Ax Scheduler (Orchestrator), enabling automatic experiment status updates based on which optimization phase the generation strategy is in. Key Changes 🔧 1. Orchestrator (orchestrator.py): After generating new trials, extracts suggested experiment status from generator runs and updates experiment.status 2. DB Persistence (save.py + with_db_settings_base.py): Added update_experiment_status() function and wired it to save status changes to DB after trial generation 3. Tests: Added test_generate_candidates_updates_experiment_status() to verify the whole flow works Reviewed By: lena-kashtelyan Differential Revision: D87589267
ac4a2a0 to
e9c049a
Compare
CristianLara
added a commit
to CristianLara/Ax
that referenced
this pull request
Feb 13, 2026
…k#4891) Summary: Connect the experiment lifecycle tracking system to the Ax Scheduler (Orchestrator), enabling automatic experiment status updates based on which optimization phase the generation strategy is in. Key Changes 🔧 1. Orchestrator (orchestrator.py): After generating new trials, extracts suggested experiment status from generator runs and updates experiment.status 2. DB Persistence (save.py + with_db_settings_base.py): Added update_experiment_status() function and wired it to save status changes to DB after trial generation 3. Tests: Added test_generate_candidates_updates_experiment_status() to verify the whole flow works Reviewed By: lena-kashtelyan Differential Revision: D87589267
Summary: ## Summary Add `suggested_experiment_status` column to `GeneratorRun`. Some benefits: 1. We don't need to modify the GS.gen() or Orchestrator methods to pass along a suggested status via tuple, instead it's baked into the GeneratorRuns that are already being passed along 2. The suggested status are more clearly stored in the database for historical tracking Prior to this approach I tried changing `GS.gen()` to return a tuple including the `suggested_experiment_status` but that over-complicated callsites. ## AOSC DIFF D92476170 Reviewed By: lena-kashtelyan Differential Revision: D88091530
…rRun (facebook#4885) Summary: In the previous diff (D88091530) we added `suggested_experiment_status` the column to GeneratorRun, now we populate it during creation from GenerationNode. Reviewed By: lena-kashtelyan Differential Revision: D92555215
…#4900) Summary: Add a new static method `experiment_status_from_generator_runs()` to `GenerationStrategy` that extracts and validates a suggested ExperimentStatus from a list of GeneratorRun objects. It collects all unique suggested_experiment_status values from the runs and: - Returns None with a warning if there are conflicting statuses across runs - Returns None with an info log if no statuses are found - Returns the single agreed-upon status otherwise Reviewed By: lena-kashtelyan Differential Revision: D92985915
…k#4891) Summary: Connect the experiment lifecycle tracking system to the Ax Scheduler (Orchestrator), enabling automatic experiment status updates based on which optimization phase the generation strategy is in. Key Changes 🔧 1. Orchestrator (orchestrator.py): After generating new trials, extracts suggested experiment status from generator runs and updates experiment.status 2. DB Persistence (save.py + with_db_settings_base.py): Added update_experiment_status() function and wired it to save status changes to DB after trial generation 3. Tests: Added test_generate_candidates_updates_experiment_status() to verify the whole flow works Reviewed By: lena-kashtelyan Differential Revision: D87589267
e9c049a to
0303af7
Compare
|
This pull request has been merged in f0bd257. |
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
This change enables the Ax Scheduler (Orchestrator) to receive and propagate suggested experiment status from the generation strategy, then persist it to the database. This is a key integration point that connects the experiment lifecycle tracking system to the scheduler workflow.
What Changed
Updated
GenerationStrategy.gen()signature (/data/sandcastle/boxes/fbsource/fbcode/ax/generation_strategy/generation_strategy.py):list[list[GeneratorRun]]to tuple including statusUpdated Orchestrator flow (
/data/sandcastle/boxes/fbsource/fbcode/ax/service/orchestrator.py):_get_next_trials()to return suggested experiment status as third element in tuple_gen_new_trials_from_generation_strategy()to receive and return suggested status fromgeneration_strategy.gen()generate_candidates()to receive suggested status and pass it to_save_or_update_trials_and_generation_strategy_if_possible()Updated database persistence (
/data/sandcastle/boxes/fbsource/fbcode/ax/service/utils/with_db_settings_base.py):suggested_experiment_statusparameter to_save_or_update_trials_and_generation_strategy_if_possible()_update_experiment_status_in_db_if_possible()when suggested status is providedWhy This Change
This integrates the experiment lifecycle tracking feature (added in D86801911, D88089767, D88091834, D88096914) into the Scheduler/Orchestrator workflow. When the generation strategy suggests an experiment status (e.g., INITIALIZATION for Sobol exploration, OPTIMIZATION for model-based optimization), the scheduler now:
This enables automatic experiment lifecycle management based on what optimization phase the generation strategy is in, providing users with clear visibility into experiment progression.
Differential Revision: D87589267