From 5822aa23880bc16a8d5c8e4355cc19f405da373c Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Fri, 2 Nov 2018 12:08:46 -0700 Subject: [PATCH] Rename get_task -> worker_idle in timeline. (#3179) * Rename get_task -> worker_idle in timeline. * Fix test. --- python/ray/experimental/state.py | 2 +- python/ray/worker.py | 2 +- test/runtest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ray/experimental/state.py b/python/ray/experimental/state.py index 177de89d2..723d4b9fb 100644 --- a/python/ray/experimental/state.py +++ b/python/ray/experimental/state.py @@ -625,7 +625,7 @@ class GlobalState(object): # https://github.com/catapult-project/catapult/blob/master/tracing/tracing/base/color_scheme.html. # noqa: E501 default_color_mapping = defaultdict( lambda: "generic_work", { - "get_task": "cq_build_abandoned", + "worker_idle": "cq_build_abandoned", "task": "rail_response", "task:deserialize_arguments": "rail_load", "task:execute": "rail_animation", diff --git a/python/ray/worker.py b/python/ray/worker.py index 7f5d28752..b503aabeb 100644 --- a/python/ray/worker.py +++ b/python/ray/worker.py @@ -918,7 +918,7 @@ class Worker(object): Returns: A task from the local scheduler. """ - with profiling.profile("get_task", worker=self): + with profiling.profile("worker_idle", worker=self): task = self.local_scheduler_client.get_task() # Automatically restrict the GPUs available to this task. diff --git a/test/runtest.py b/test/runtest.py index 10c4fa46d..a7c4b3e16 100644 --- a/test/runtest.py +++ b/test/runtest.py @@ -1015,7 +1015,7 @@ def test_profiling_api(shutdown_only): profile_data = ray.global_state.chrome_tracing_dump() event_types = {event["cat"] for event in profile_data} expected_types = [ - "get_task", + "worker_idle", "task", "task:deserialize_arguments", "task:execute",