mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 13:19:38 +08:00
Fix checkpoint crash for actor creation task. (#4327)
* Fix checkpoint crash for actor creation task. * Lint * Move test to test_actor.py * Revert unused code in test_failure.py * Refine test according to Raul's suggestion.
This commit is contained in:
@@ -783,8 +783,10 @@ class FunctionActorManager(object):
|
||||
method_returns = method(actor, *args)
|
||||
except Exception as e:
|
||||
# Save the checkpoint before allowing the method exception
|
||||
# to be thrown.
|
||||
if isinstance(actor, ray.actor.Checkpointable):
|
||||
# to be thrown, but don't save the checkpoint for actor
|
||||
# creation task.
|
||||
if (isinstance(actor, ray.actor.Checkpointable)
|
||||
and self._worker.actor_task_counter != 1):
|
||||
self._save_and_log_checkpoint(actor)
|
||||
raise e
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user