Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Small optimizations from accelerated DAG experiment #41418

Merged
merged 12 commits into from
Nov 30, 2023
Prev Previous commit
Next Next commit
Revert "revert auto init hook"
This reverts commit 53cfcbb.
  • Loading branch information
ericl committed Nov 30, 2023
commit 67c06c997853880fe95502e4cd1a86835ba0c2f7
6 changes: 2 additions & 4 deletions python/ray/_private/auto_init_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
import threading

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


def auto_init_ray():
if (
os.environ.get("RAY_ENABLE_AUTO_CONNECT", "") != "0"
and not ray.is_initialized()
):
if enable_auto_connect and not ray.is_initialized():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Beat me to fixing this. It's a small thing but notoriously showing up in every profile

auto_init_lock.acquire()
if not ray.is_initialized():
ray.init()
Expand Down