mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
[Tune] Remove unnecessary argument in update_last_result
. (#20653)
This commit is contained in:
parent
720bca8a1c
commit
e24c1dccb0
2 changed files with 3 additions and 4 deletions
|
@ -627,7 +627,7 @@ class Trial:
|
|||
"""
|
||||
return self.num_failures < self.max_failures or self.max_failures < 0
|
||||
|
||||
def update_last_result(self, result, terminate=False):
|
||||
def update_last_result(self, result):
|
||||
if self.experiment_tag:
|
||||
result.update(experiment_tag=self.experiment_tag)
|
||||
|
||||
|
|
|
@ -1023,8 +1023,7 @@ class TrialRunner:
|
|||
trial=trial)
|
||||
|
||||
if not is_duplicate:
|
||||
trial.update_last_result(
|
||||
result, terminate=(decision == TrialScheduler.STOP))
|
||||
trial.update_last_result(result)
|
||||
|
||||
# Checkpoints to disk. This should be checked even if
|
||||
# the scheduler decision is STOP or PAUSE. Note that
|
||||
|
@ -1357,7 +1356,7 @@ class TrialRunner:
|
|||
try:
|
||||
results = self.trial_executor.fetch_result(trial)
|
||||
result = results[-1]
|
||||
trial.update_last_result(result, terminate=True)
|
||||
trial.update_last_result(result)
|
||||
self._scheduler_alg.on_trial_complete(self, trial, result)
|
||||
self._search_alg.on_trial_complete(
|
||||
trial.trial_id, result=result)
|
||||
|
|
Loading…
Add table
Reference in a new issue