mirror of
https://github.com/wassname/ray.git
synced 2026-07-03 06:19:29 +08:00
[client] Hook runtime context (#13750)
Change-Id: I701d21e53900b5f3fb0e23e09f59e8316c7ba623
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import ray.worker
|
||||
import logging
|
||||
from ray._private.client_mode_hook import client_mode_hook
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -149,6 +150,7 @@ class RuntimeContext(object):
|
||||
_runtime_context = None
|
||||
|
||||
|
||||
@client_mode_hook
|
||||
def get_runtime_context():
|
||||
global _runtime_context
|
||||
if _runtime_context is None:
|
||||
|
||||
Reference in New Issue
Block a user