Example #1
0
 def _deserialize_actor_died_error(self, data, metadata_fields):
     if not data:
         return RayActorError()
     ray_error_info = self._deserialize_error_info(data, metadata_fields)
     assert ray_error_info.HasField("actor_died_error")
     if ray_error_info.actor_died_error.HasField("creation_task_failure_context"):
         return RayError.from_ray_exception(
             ray_error_info.actor_died_error.creation_task_failure_context
         )
     else:
         assert ray_error_info.actor_died_error.HasField("actor_died_error_context")
         return RayActorError(
             cause=ray_error_info.actor_died_error.actor_died_error_context
         )
Example #2
0
    def _deserialize_actor_died_error(self, data, metadata_fields):
        if not data:
            return RayActorError()
        pb_bytes = self._deserialize_msgpack_data(data, metadata_fields)
        assert pb_bytes

        ray_error_info = RayErrorInfo()
        ray_error_info.ParseFromString(pb_bytes)
        assert ray_error_info.HasField("actor_died_error")
        if ray_error_info.actor_died_error.HasField(
                "creation_task_failure_context"):
            return RayError.from_ray_exception(
                ray_error_info.actor_died_error.creation_task_failure_context)
        else:
            assert ray_error_info.actor_died_error.HasField(
                "actor_died_error_context")
            return RayActorError(
                cause=ray_error_info.actor_died_error.actor_died_error_context)