-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[tune] Refactor TrialRunner to separate out executor calls #33448
[tune] Refactor TrialRunner to separate out executor calls #33448
Conversation
Signed-off-by: Kai Fricke <kai@anyscale.com>
…-refactor # Conflicts: # python/ray/tune/execution/ray_trial_executor.py # python/ray/tune/execution/trial_runner.py # python/ray/tune/experiment/trial.py
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
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.
Approve to unblock the remaining one PR, since this PR is mostly splitting the logic in TrialRunner into executor-independent, and executor-dependent one (to be replaced by the new controller).
Overall feedback is that TrialRunner (minus anything searcher/scheduler related) and Trial possibly should become "AIR concept" rather than "Tune concept".
…ct#33448) We are planning to refactor the Ray Tune trial lifecycle management by offering an improved execution engine. The TrialRunner currently encapsulates most of the execution logic. When switching the Ray execution backend, we would like to retain most of this logic. Thus, we prepare the refactor by restructuring the TrialRunner: - The TrialRunner is split into a _TrialRunnerBase and TrialRunner class - The _TrialRunnerBase contains all lifecycle logic that is independent from execution. For instance, processing trial results, and scheduling trial training - The TrialRunner class contains the communication with the RayTrialExecutor - Our future TuneController (which is prototyped) will also inherit from _TrialRunnerBase Please note that this PR does not change any logic. Is only renames some internal methods and changes the class structure. Signed-off-by: Kai Fricke <kai@anyscale.com> Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
…ct#33448) We are planning to refactor the Ray Tune trial lifecycle management by offering an improved execution engine. The TrialRunner currently encapsulates most of the execution logic. When switching the Ray execution backend, we would like to retain most of this logic. Thus, we prepare the refactor by restructuring the TrialRunner: - The TrialRunner is split into a _TrialRunnerBase and TrialRunner class - The _TrialRunnerBase contains all lifecycle logic that is independent from execution. For instance, processing trial results, and scheduling trial training - The TrialRunner class contains the communication with the RayTrialExecutor - Our future TuneController (which is prototyped) will also inherit from _TrialRunnerBase Please note that this PR does not change any logic. Is only renames some internal methods and changes the class structure. Signed-off-by: Kai Fricke <kai@anyscale.com>
…ct#33448) We are planning to refactor the Ray Tune trial lifecycle management by offering an improved execution engine. The TrialRunner currently encapsulates most of the execution logic. When switching the Ray execution backend, we would like to retain most of this logic. Thus, we prepare the refactor by restructuring the TrialRunner: - The TrialRunner is split into a _TrialRunnerBase and TrialRunner class - The _TrialRunnerBase contains all lifecycle logic that is independent from execution. For instance, processing trial results, and scheduling trial training - The TrialRunner class contains the communication with the RayTrialExecutor - Our future TuneController (which is prototyped) will also inherit from _TrialRunnerBase Please note that this PR does not change any logic. Is only renames some internal methods and changes the class structure. Signed-off-by: Kai Fricke <kai@anyscale.com> Signed-off-by: elliottower <elliot@elliottower.com>
…ct#33448) We are planning to refactor the Ray Tune trial lifecycle management by offering an improved execution engine. The TrialRunner currently encapsulates most of the execution logic. When switching the Ray execution backend, we would like to retain most of this logic. Thus, we prepare the refactor by restructuring the TrialRunner: - The TrialRunner is split into a _TrialRunnerBase and TrialRunner class - The _TrialRunnerBase contains all lifecycle logic that is independent from execution. For instance, processing trial results, and scheduling trial training - The TrialRunner class contains the communication with the RayTrialExecutor - Our future TuneController (which is prototyped) will also inherit from _TrialRunnerBase Please note that this PR does not change any logic. Is only renames some internal methods and changes the class structure. Signed-off-by: Kai Fricke <kai@anyscale.com> Signed-off-by: Jack He <jackhe2345@gmail.com>
Why are these changes needed?
We are planning to refactor the Ray Tune trial lifecycle management by offering an improved execution engine. The TrialRunner currently encapsulates most of the execution logic. When switching the Ray execution backend, we would like to retain most of this logic. Thus, we prepare the refactor by restructuring the TrialRunner:
Please note that this PR does not change any logic. Is only renames some internal methods and changes the class structure.
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.