From 506560b0ee6219ddc260c5622118b748fd5d2de8 Mon Sep 17 00:00:00 2001 From: Mengjin Yan Date: Mon, 25 Nov 2024 14:59:08 -0800 Subject: [PATCH] fix lint issue Signed-off-by: Mengjin Yan --- python/ray/_private/ray_logging/constants.py | 2 +- python/ray/serve/tests/test_logging.py | 8 ++++---- python/ray/tests/test_logging_2.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python/ray/_private/ray_logging/constants.py b/python/ray/_private/ray_logging/constants.py index 7743c310ccf1..54552bdfe1d7 100644 --- a/python/ray/_private/ray_logging/constants.py +++ b/python/ray/_private/ray_logging/constants.py @@ -43,7 +43,7 @@ class LogKey(str, Enum): TASK_ID = "task_id" ACTOR_NAME = "actor_name" TASK_NAME = "task_name" - TASK_FUNCTION_NAME = "task_function_name" + TASK_FUNCTION_NAME = "task_func_name" # Logger built-in context ASCTIME = "asctime" diff --git a/python/ray/serve/tests/test_logging.py b/python/ray/serve/tests/test_logging.py index 0833873ae16b..24f9a47a01a1 100644 --- a/python/ray/serve/tests/test_logging.py +++ b/python/ray/serve/tests/test_logging.py @@ -352,7 +352,7 @@ def fn(*args): "worker_id": ray.get_runtime_context().get_worker_id(), "node_id": ray.get_runtime_context().get_node_id(), "task_name": ray.get_runtime_context().get_task_name(), - "task_function_name": ray.get_runtime_context().get_task_function_name(), + "task_func_name": ray.get_runtime_context().get_task_function_name(), "actor_name": ray.get_runtime_context().get_actor_name(), } @@ -373,7 +373,7 @@ def __call__(self, req: starlette.requests.Request): "worker_id": ray.get_runtime_context().get_worker_id(), "node_id": ray.get_runtime_context().get_node_id(), "task_name": ray.get_runtime_context().get_task_name(), - "task_function_name": ray.get_runtime_context().get_task_function_name(), + "task_func_name": ray.get_runtime_context().get_task_function_name(), "actor_name": ray.get_runtime_context().get_actor_name(), } @@ -425,7 +425,7 @@ def check_log(): f'"node_id": "{resp["node_id"]}", ' f'"actor_id": "{resp["actor_id"]}", ' f'"task_name": "{resp["task_name"]}", ' - f'"task_function_name": "{resp["task_function_name"]}", ' + f'"task_func_name": "{resp["task_func_name"]}", ' f'"actor_name": "{resp["actor_name"]}", ' f'"deployment": "{resp["app_name"]}_fn", ' f'"replica": "{method_replica_id}", ' @@ -440,7 +440,7 @@ def check_log(): f'"node_id": "{resp2["node_id"]}", ' f'"actor_id": "{resp2["actor_id"]}", ' f'"task_name": "{resp2["task_name"]}", ' - f'"task_function_name": "{resp2["task_function_name"]}", ' + f'"task_func_name": "{resp2["task_func_name"]}", ' f'"actor_name": "{resp2["actor_name"]}", ' f'"deployment": "{resp2["app_name"]}_Model", ' f'"replica": "{class_method_replica_id}", ' diff --git a/python/ray/tests/test_logging_2.py b/python/ray/tests/test_logging_2.py index 6bc4ed8cae32..9d5be165f9ac 100644 --- a/python/ray/tests/test_logging_2.py +++ b/python/ray/tests/test_logging_2.py @@ -55,7 +55,7 @@ def f(): "node_id": runtime_context.get_node_id(), "task_id": runtime_context.get_task_id(), "task_name": runtime_context.get_task_name(), - "task_function_name": runtime_context.get_task_function_name(), + "task_func_name": runtime_context.get_task_function_name(), } for attr in should_exist: assert hasattr(record, attr) @@ -83,7 +83,7 @@ def f(self): "actor_name": runtime_context.get_actor_name(), "task_id": runtime_context.get_task_id(), "task_name": runtime_context.get_task_name(), - "task_function_name": runtime_context.get_task_function_name(), + "task_func_name": runtime_context.get_task_function_name(), } for attr in should_exist: assert hasattr(record, attr)