mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 11:53:32 +08:00
Fix wrong ID type in prepare_checkpoint (#4124)
* Fix wrong ID type in prepare_checkpoint * fix * fix eq
This commit is contained in:
@@ -354,7 +354,7 @@ cdef class RayletClient:
|
||||
cdef CActorCheckpointID checkpoint_id
|
||||
check_status(self.client.get().PrepareActorCheckpoint(
|
||||
actor_id.data, checkpoint_id))
|
||||
return ObjectID.from_native(checkpoint_id)
|
||||
return ActorCheckpointID.from_native(checkpoint_id)
|
||||
|
||||
def notify_actor_resumed_from_checkpoint(self, ActorID actor_id,
|
||||
ActorCheckpointID checkpoint_id):
|
||||
|
||||
@@ -74,7 +74,7 @@ cdef class UniqueID:
|
||||
return self.data.is_nil()
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.binary() == other.binary()
|
||||
return type(self) == type(other) and self.binary() == other.binary()
|
||||
|
||||
def __ne__(self, other):
|
||||
return self.binary() != other.binary()
|
||||
@@ -263,7 +263,7 @@ cdef class ActorCheckpointID(UniqueID):
|
||||
|
||||
@staticmethod
|
||||
cdef from_native(const CActorCheckpointID& cpp_id):
|
||||
cdef ActorCheckpointID self = ActorCheckpointID.__new__(ActorHandleID)
|
||||
cdef ActorCheckpointID self = ActorCheckpointID.__new__(ActorCheckpointID)
|
||||
self.data = cpp_id
|
||||
return self
|
||||
|
||||
|
||||
Reference in New Issue
Block a user