-
Notifications
You must be signed in to change notification settings - Fork 357
Scheduler updates experiment status from generation strategy #4891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@CristianLara has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87589267. |
Summary: This change introduces an optional `suggested_experiment_state` field to the `GenerationNode` class that allows tracking what experiment status is suggested for a given generation node. This is part of a larger effort to add status tracking to experiments. The field is: - Optional (defaults to None for backward compatibility) - Advisory only (does not automatically update experiment.status) - Configurable per GenerationNode instance - Serialized automatically via SerializationMixin - Displayed in __repr__ when set This is Phase 1 where we are just adding the column but not yet doing anything with it. In the next diffs in this stack we will propagate this through the orchestrator and eventually set this status on the experiment. Reviewed By: mgarrard Differential Revision: D88089767
Summary: Set the `suggested_experiment_status` field on generation nodes throughout the codebase. This will be used in the next diffs in stack to allow the orchestrator to automatically update experiment status based on the optimization phase. **Why this change:** This builds on the infrastructure added in previous diffs which added the status field to Experiment, and GenerationNode. Now we're actually setting the field on nodes so that experiments will automatically transition through their lifecycle based on what GS node they're in. Reviewed By: lena-kashtelyan, mgarrard Differential Revision: D88214256
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 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. 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 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 Differential Revision: D87589267
c71719e to
5b61d6e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4891 +/- ##
========================================
Coverage 96.76% 96.77%
========================================
Files 593 593
Lines 62037 62174 +137
========================================
+ Hits 60031 60166 +135
- Misses 2006 2008 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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