Refactor Runner base class: rename run_multiple→run_trials, add stage_trials/stop_trial/stop_arms/poll_run_metadata/apply_status_change_side_effects, deprecate run/poll_exception/stop#5094
Closed
lena-kashtelyan wants to merge 1 commit intofacebook:mainfrom
Conversation
…_trials/stop_trial/stop_arms/poll_run_metadata/apply_status_change_side_effects, deprecate run/poll_exception/stop Summary: Refactors the core Runner base class per the E2E Automation design doc: **Renamed/restructured methods:** - `run_multiple` → `run_trials` (kept `run_multiple` as deprecated wrapper) - `stop` → `stop_trial` (kept `stop` as deprecated fallback) - `run` is no longer abstract; `run_trials` default implementation calls it for backward compat **New methods added:** - `stage_trials(trials)` — does nothing by default, override for staging - `stop_arms(trial, arm_names, reason)` — stop specific arms in a trial - `poll_run_metadata(trials)` — update run metadata from actual deployment - `apply_status_change_side_effects(trials)` — dedicated place for status-change side effects **Deprecated methods (to be removed after runner migration):** - `run(trial)` — override `run_trials` instead - `poll_exception(trial)` — fold into `poll_trial_status` - `stop(trial, reason)` — override `stop_trial` instead - `run_multiple(trials)` — use `run_trials` instead Differential Revision: D97842794
|
@lena-kashtelyan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97842794. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5094 +/- ##
==========================================
- Coverage 96.30% 96.29% -0.01%
==========================================
Files 611 611
Lines 67534 67566 +32
==========================================
+ Hits 65040 65066 +26
- Misses 2494 2500 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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:
Refactors the core Runner base class per the E2E Automation design doc:
Renamed/restructured methods:
run_multiple→run_trials(keptrun_multipleas deprecated wrapper)stop→stop_trial(keptstopas deprecated fallback)runis no longer abstract;run_trialsdefault implementation calls it for backward compatNew methods added:
stage_trials(trials)— does nothing by default, override for stagingstop_arms(trial, arm_names, reason)— stop specific arms in a trialpoll_run_metadata(trials)— update run metadata from actual deploymentapply_status_change_side_effects(trials)— dedicated place for status-change side effectsDeprecated methods (to be removed after runner migration):
run(trial)— overriderun_trialsinsteadpoll_exception(trial)— fold intopoll_trial_statusstop(trial, reason)— overridestop_trialinsteadrun_multiple(trials)— userun_trialsinsteadDifferential Revision: D97842794