mirror of
https://github.com/wassname/ray.git
synced 2026-07-23 13:10:11 +08:00
[tune] Added possibility to execute infinite recovery retries for a trial (#3901)
Allows to let a trial try to do infinite recoveries by setting _max_failures_ to a negative number.
This commit is contained in:
@@ -356,7 +356,8 @@ class Trial(object):
|
||||
be a checkpoint.
|
||||
"""
|
||||
return (self.checkpoint_freq > 0
|
||||
and self.num_failures < self.max_failures)
|
||||
and (self.num_failures < self.max_failures
|
||||
or self.max_failures < 0))
|
||||
|
||||
def update_last_result(self, result, terminate=False):
|
||||
if terminate:
|
||||
|
||||
Reference in New Issue
Block a user