[Tune] Remove runner argument in start_trial. (#20464)

This internal legacy argument was not used by any code.
This commit is contained in:
xwjiang2010 2021-11-17 08:59:57 -08:00 committed by GitHub
parent d1c624901f
commit 03aec4e04a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -466,8 +466,7 @@ class RayTrialExecutor(TrialExecutor):
trial_item = self._find_item(self._running, trial)
assert len(trial_item) < 2, trial_item
def _start_trial(self, trial, checkpoint=None, runner=None,
train=True) -> bool:
def _start_trial(self, trial, checkpoint=None, train=True) -> bool:
"""Starts trial and restores last result if trial was paused.
Args:
@ -475,8 +474,6 @@ class RayTrialExecutor(TrialExecutor):
checkpoint (Optional[Checkpoint]): The checkpoint to restore from.
If None, and no trial checkpoint exists, the trial is started
from the beginning.
runner (Trainable): The remote runner to use. This can be the
cached actor. If None, a new runner is created.
train (bool): Whether or not to start training.
Returns:
@ -486,10 +483,9 @@ class RayTrialExecutor(TrialExecutor):
"""
prior_status = trial.status
self.set_status(trial, Trial.PENDING)
if runner is None:
runner = self._setup_remote_runner(trial)
if not runner:
return False
runner = self._setup_remote_runner(trial)
if not runner:
return False
trial.set_runner(runner)
self._notify_trainable_of_new_resources_if_needed(trial)
self.restore(trial, checkpoint)