Skip to content

Commit

Permalink
[Autoscaler] Prefix (autoscaler) instead of (scheduler) for autoscale…
Browse files Browse the repository at this point in the history
…r events

Signed-off-by: praveeng <praveeng@anyscale.com>
  • Loading branch information
gvspraveen committed Jan 6, 2023
1 parent 4a2cfa1 commit 0deafaf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/ray/_private/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ def color_for(data: Dict[str, str], line: str) -> str:
return colorama.Fore.CYAN

if data.get("pid") == "autoscaler":
pid = "scheduler +{}".format(time_string())
pid = "autoscaler +{}".format(time_string())
lines = filter_autoscaler_events(data.get("lines", []))
else:
pid = data.get("pid")
Expand Down
24 changes: 24 additions & 0 deletions python/ray/tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,30 @@ def f():
assert "Tip:" not in err_str


def test_autoscaler_prefix():
script = """
import ray
import time
ray.init(num_cpus=1)
@ray.remote(num_cpus=1)
class A:
pass
a = A.remote()
b = A.remote()
time.sleep(25)
"""

proc = run_string_as_driver_nonblocking(script)
out_str = proc.stdout.read().decode("ascii")
err_str = proc.stderr.read().decode("ascii")

print(out_str, err_str)
assert "(autoscaler" in out_str


@pytest.mark.skipif(sys.platform == "win32", reason="Failing on Windows.")
def test_fail_importing_actor(ray_start_regular, error_pubsub):
script = f"""
Expand Down

0 comments on commit 0deafaf

Please sign in to comment.