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

Method current

python/ray/data/context.py:994–999  ·  view source on GitHub ↗
(context: "DataContext")

Source from the content-addressed store, hash-verified

992 @staticmethod
993 @contextlib.contextmanager
994 def current(context: "DataContext"):
995 prev: Optional[DataContext] = DataContext._set_current(context)
996 try:
997 yield
998 finally:
999 DataContext._set_current(prev)
1000
1001 @staticmethod
1002 def _set_current(context: Optional["DataContext"]) -> Optional["DataContext"]:

Callers

nothing calls this directly

Calls 1

_set_currentMethod · 0.80

Tested by

no test coverage detected