MCPcopy
hub / github.com/ray-project/ray / __init__

Method __init__

python/ray/util/client/common.py:89–98  ·  view source on GitHub ↗
(self, id: Union[bytes, Future])

Source from the content-addressed store, hash-verified

87
88class ClientObjectRef(raylet.ObjectRef):
89 def __init__(self, id: Union[bytes, Future]):
90 self._mutex = threading.Lock()
91 self._worker = ray.get_context().client_worker
92 self._id_future = None
93 if isinstance(id, bytes):
94 self._set_id(id)
95 elif isinstance(id, Future):
96 self._id_future = id
97 else:
98 raise TypeError("Unexpected type for id {}".format(id))
99
100 def __del__(self):
101 if self._worker is not None and self._worker.is_connected():

Callers

nothing calls this directly

Calls 3

_set_idMethod · 0.95
get_contextMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected