Skip to content

Commit

Permalink
fix lint issue
Browse files Browse the repository at this point in the history
Signed-off-by: Mengjin Yan <[email protected]>
  • Loading branch information
MengjinYan committed Nov 25, 2024
1 parent 36160b7 commit 506560b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/ray/_private/ray_logging/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions python/ray/serve/tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}

Expand All @@ -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(),
}

Expand Down Expand Up @@ -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}", '
Expand All @@ -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}", '
Expand Down
4 changes: 2 additions & 2 deletions python/ray/tests/test_logging_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 506560b

Please sign in to comment.