Skip to content

Commit

Permalink
revert auto init hook
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Liang <ekhliang@gmail.com>
  • Loading branch information
ericl committed Nov 30, 2023
1 parent a019d22 commit 53cfcbb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/ray/_private/auto_init_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import threading

auto_init_lock = threading.Lock()
enable_auto_connect = os.environ.get("RAY_ENABLE_AUTO_CONNECT", "") != "0"


def auto_init_ray():
if enable_auto_connect and not ray.is_initialized():
if (
os.environ.get("RAY_ENABLE_AUTO_CONNECT", "") != "0"
and not ray.is_initialized()
):
auto_init_lock.acquire()
if not ray.is_initialized():
ray.init()
Expand Down

0 comments on commit 53cfcbb

Please sign in to comment.