Suppress warning for serializing different unique ID types in Python. (#3872)

* Suppress warning for serializing different unique ID types in Python.

* Add _ID_TYPES variable.
This commit is contained in:
Robert Nishihara
2019-02-05 11:38:33 -08:00
committed by Stephanie Wang
parent b2b8417790
commit fa4eb8313d
3 changed files with 14 additions and 18 deletions
+6
View File
@@ -4,6 +4,8 @@ We define different types for different IDs for type safety.
See https://github.com/ray-project/ray/issues/3721.
"""
# WARNING: Any additional ID types defined in this file must be added to the
# _ID_TYPES list at the bottom of this file.
from ray.includes.common cimport (
CUniqueID, CTaskID, CObjectID, CFunctionID, CActorClassID, CActorID,
CActorHandleID, CWorkerID, CDriverID, CConfigID, CClientID,
@@ -278,3 +280,7 @@ cdef class ActorClassID(UniqueID):
def __repr__(self):
return "ActorClassID(" + self.hex() + ")"
_ID_TYPES = [UniqueID, ObjectID, TaskID, ClientID, DriverID, ActorID,
ActorHandleID, FunctionID, ActorClassID]