MCPcopy Index your code
hub / github.com/ray-project/ray / set_context

Method set_context

python/ray/util/client/__init__.py:342–348  ·  view source on GitHub ↗
(self, cxt)

Source from the content-addressed store, hash-verified

340 return self._cxt.handler
341
342 def set_context(self, cxt):
343 old_cxt = self.get_context()
344 if cxt is None:
345 self._cxt.handler = _ClientContext()
346 else:
347 self._cxt.handler = cxt
348 return old_cxt
349
350 def is_default(self):
351 return self.get_context() == _default_context

Callers

nothing calls this directly

Calls 2

get_contextMethod · 0.95
_ClientContextClass · 0.85

Tested by

no test coverage detected