mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[serve] Remove logic to automatically infer conda env name (#17639)
This commit is contained in:
parent
b173b33934
commit
57b190c987
1 changed files with 0 additions and 17 deletions
|
@ -3,9 +3,7 @@ import atexit
|
|||
import collections
|
||||
import inspect
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
from functools import wraps
|
||||
|
@ -330,21 +328,6 @@ class Client:
|
|||
if ray_actor_options is None:
|
||||
ray_actor_options = {}
|
||||
|
||||
# If conda is activated and a conda env is not specified in runtime_env
|
||||
# in ray_actor_options, default to conda env of this process (client).
|
||||
# Without this code, the backend would run in the controller's conda
|
||||
# env, which is likely different from that of the client.
|
||||
# If using Ray client, skip this convenience feature because the local
|
||||
# client env doesn't create the Ray cluster (so the client env is
|
||||
# likely not present on the cluster.)
|
||||
if not ray.util.client.ray.is_connected() and sys.platform != "win32":
|
||||
if ray_actor_options.get("runtime_env") is None:
|
||||
ray_actor_options["runtime_env"] = {}
|
||||
if ray_actor_options["runtime_env"].get("conda") is None:
|
||||
current_env = os.environ.get("CONDA_DEFAULT_ENV")
|
||||
if current_env is not None and current_env != "":
|
||||
ray_actor_options["runtime_env"]["conda"] = current_env
|
||||
|
||||
replica_config = ReplicaConfig(
|
||||
backend_def, *init_args, ray_actor_options=ray_actor_options)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue