mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[Core] [runtime env] Print message on driver when installing conda or pip (#16516)
This commit is contained in:
parent
e6fa8c0015
commit
3ba1cb851e
1 changed files with 8 additions and 2 deletions
|
@ -3,6 +3,7 @@ from ray.job_config import JobConfig
|
|||
import os
|
||||
import sys
|
||||
import logging
|
||||
import json
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -62,11 +63,16 @@ class RayAPIStub:
|
|||
# If we're calling a client connect specifically and we're not
|
||||
# currently in client mode, ensure we are.
|
||||
ray._private.client_mode_hook._explicitly_enable_client_mode()
|
||||
|
||||
if namespace is not None:
|
||||
job_config = job_config or JobConfig()
|
||||
job_config.set_ray_namespace(namespace)
|
||||
|
||||
if job_config is not None:
|
||||
runtime_env = json.loads(job_config.get_serialized_runtime_env())
|
||||
if runtime_env.get("pip") or runtime_env.get("conda"):
|
||||
logger.warning("The 'pip' or 'conda' field was specified in "
|
||||
"the runtime env, so it may take some time to "
|
||||
"install the environment before ray.connect() "
|
||||
"returns.")
|
||||
try:
|
||||
self.client_worker = Worker(
|
||||
conn_str,
|
||||
|
|
Loading…
Add table
Reference in a new issue