-
Notifications
You must be signed in to change notification settings - Fork 68
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
WIP: Introduce TrialRunner Abstraction #720
base: main
Are you sure you want to change the base?
Conversation
…nit test for bench (not tested)
…e bulk registration (check for is_warm_up)
assert { | ||
trial_runner.environment.const_args["trial_runner_id"] | ||
for trial_runner in launcher.trial_runners | ||
} == set(range(0, len(launcher.trial_runners))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXME: Some places I think we use 0 indexing and others 1 indexing. We should be consistent about that.
return config | ||
|
||
# NOTE: This may no longer be necessary with the new schema. | ||
def add_new_config_data( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were refactored originally to avoid changing the schema. We don't need that anymore, but it still might be handy to keep around.
@motus, thoughts on reverting vs. just leaving this part of it? It also affects the _save_params
code movement.
@@ -446,6 +455,25 @@ def tunables(self) -> TunableGroups: | |||
""" | |||
return self._tunables | |||
|
|||
@abstractmethod | |||
def assign_trial_runner(self, trial_runner_id: int) -> int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this up to be near the property?
@@ -129,7 +129,7 @@ | |||
>>> # Access ExperimentData by experiment id. | |||
>>> experiment_data = storage.experiments["my_experiment_id"] | |||
>>> experiment_data.trials | |||
{1: Trial :: my_experiment_id:1 cid:1 SUCCEEDED} | |||
{1: Trial :: my_experiment_id:1 cid:1 rid:None SUCCEEDED} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No runner assigned here. May want to note that in the docstring.
This is another step in adding support for parallel trial execution #380.
Here we separate out the running of an individual trial to a single class - TrialRunner.
Multiple TrialRunners are instantiated at CLI invocation with the
--num-trial-runners
argument.Each TrialRunner associated with a single copy of the root Environment, and made unique by means of a unique
trial_runner_id
value that's included in that Environment's global_config.TODO:
In future PRs we will add: