Add arm_name_prefix parameter to make_candidate_trials#5252
Closed
lena-kashtelyan wants to merge 1 commit into
Closed
Add arm_name_prefix parameter to make_candidate_trials#5252lena-kashtelyan wants to merge 1 commit into
lena-kashtelyan wants to merge 1 commit into
Conversation
Summary:
Adds an optional `arm_name_prefix` parameter to `AxBatchClient.make_candidate_trials`, plumbed through `Experiment.new_batch_trial`, `BatchTrial`, and `BaseTrial`. When provided, arms generated for the trial are named `{arm_name_prefix}_{trial_index}_{arm_index}` instead of the default `{trial_index}_{arm_index}` scheme. Retaining the trial and arm indices keeps arm names unique even when the same prefix is reused across multiple batches (per reviewer feedback), while the prefix makes it easy to identify which scenario a batch of arms was generated for (e.g. `max_rev_neutral_engagement_9_4`).
The prefix is stored on the trial (`_arm_name_prefix`) and consumed by `BaseTrial._get_default_name`, so arms that already carry an explicit name are left untouched. The prefix is ephemeral trial-construction state and is excluded from DB id-copying (`COPY_DB_IDS_ATTRS_TO_SKIP`).
Reviewed By: mgarrard, eonofrey
Differential Revision: D110326546
|
@lena-kashtelyan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110326546. |
|
This pull request has been merged in 4f14d60. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5252 +/- ##
==========================================
- Coverage 96.58% 96.57% -0.01%
==========================================
Files 621 621
Lines 70637 70663 +26
==========================================
+ Hits 68222 68241 +19
- Misses 2415 2422 +7 ☔ View full report in Codecov by Harness. 🚀 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:
Adds an optional
arm_name_prefixparameter toAxBatchClient.make_candidate_trials, plumbed throughExperiment.new_batch_trial,BatchTrial, andBaseTrial. When provided, arms generated for the trial are named{arm_name_prefix}_{trial_index}_{arm_index}instead of the default{trial_index}_{arm_index}scheme. Retaining the trial and arm indices keeps arm names unique even when the same prefix is reused across multiple batches (per reviewer feedback), while the prefix makes it easy to identify which scenario a batch of arms was generated for (e.g.max_rev_neutral_engagement_9_4).The prefix is stored on the trial (
_arm_name_prefix) and consumed byBaseTrial._get_default_name, so arms that already carry an explicit name are left untouched. The prefix is ephemeral trial-construction state and is excluded from DB id-copying (COPY_DB_IDS_ATTRS_TO_SKIP).Reviewed By: mgarrard, eonofrey
Differential Revision: D110326546