Skip to content

Commit 2a86943

Browse files
kfstormAlex Wu
authored and
Alex Wu
committed
[Test] Ignore setproctitle for local mode (#11819)
1 parent 6e6cb6b commit 2a86943

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

python/ray/worker.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ def connect(node,
11641164
worker.worker_id = ray.utils.compute_driver_id_from_job(
11651165
job_id).binary()
11661166

1167-
if mode is not SCRIPT_MODE and setproctitle:
1167+
if mode is not SCRIPT_MODE and mode is not LOCAL_MODE and setproctitle:
11681168
process_name = ray_constants.WORKER_PROCESS_TYPE_IDLE_WORKER
11691169
if mode is IO_WORKER_MODE:
11701170
process_name = ray_constants.WORKER_PROCESS_TYPE_IO_WORKER
@@ -1348,11 +1348,13 @@ def disconnect(exiting_interpreter=False):
13481348

13491349
@contextmanager
13501350
def _changeproctitle(title, next_title):
1351-
setproctitle.setproctitle(title)
1351+
if _mode() is not LOCAL_MODE:
1352+
setproctitle.setproctitle(title)
13521353
try:
13531354
yield
13541355
finally:
1355-
setproctitle.setproctitle(next_title)
1356+
if _mode() is not LOCAL_MODE:
1357+
setproctitle.setproctitle(next_title)
13561358

13571359

13581360
def show_in_dashboard(message, key="", dtype="text"):

0 commit comments

Comments
 (0)