From 9cbff17f1c229d9cec76cbce28d466074dc94f65 Mon Sep 17 00:00:00 2001 From: dentiny Date: Fri, 7 Feb 2025 20:58:57 -0800 Subject: [PATCH] [core] Remove unused field: stdout and stderr file for core worker (#50320) Remove unused field to avoid confusion. Signed-off-by: dentiny --- python/ray/_private/worker.py | 4 ---- python/ray/_raylet.pyx | 4 +--- python/ray/includes/libcoreworker.pxd | 2 -- src/ray/core_worker/core_worker.cc | 7 ------- src/ray/core_worker/core_worker_options.h | 6 ------ 5 files changed, 1 insertion(+), 22 deletions(-) diff --git a/python/ray/_private/worker.py b/python/ray/_private/worker.py index 1c024bd591b0..97e97aa48bec 100644 --- a/python/ray/_private/worker.py +++ b/python/ray/_private/worker.py @@ -2370,8 +2370,6 @@ def connect( ) driver_name = "" - log_stdout_file_path = "" - log_stderr_file_path = "" interactive_mode = False if mode == SCRIPT_MODE: import __main__ as main @@ -2476,8 +2474,6 @@ def connect( node.raylet_ip_address, (mode == LOCAL_MODE), driver_name, - log_stdout_file_path, - log_stderr_file_path, serialized_job_config, node.metrics_agent_port, runtime_env_hash, diff --git a/python/ray/_raylet.pyx b/python/ray/_raylet.pyx index 11b4ab463bc1..7fc6a9ac8fb7 100644 --- a/python/ray/_raylet.pyx +++ b/python/ray/_raylet.pyx @@ -2955,7 +2955,7 @@ cdef class CoreWorker: def __cinit__(self, worker_type, store_socket, raylet_socket, JobID job_id, GcsClientOptions gcs_options, log_dir, node_ip_address, node_manager_port, raylet_ip_address, - local_mode, driver_name, stdout_file, stderr_file, + local_mode, driver_name, serialized_job_config, metrics_agent_port, runtime_env_hash, startup_token, session_name, cluster_id, entrypoint, worker_launch_time_ms, worker_launched_time_ms, debug_source): @@ -2990,8 +2990,6 @@ cdef class CoreWorker: options.node_manager_port = node_manager_port options.raylet_ip_address = raylet_ip_address.encode("utf-8") options.driver_name = driver_name - options.stdout_file = stdout_file - options.stderr_file = stderr_file options.task_execution_callback = task_execution_handler options.check_signals = check_signals options.gc_collect = gc_collect diff --git a/python/ray/includes/libcoreworker.pxd b/python/ray/includes/libcoreworker.pxd index dd42b04b7c13..9892bbf3f99e 100644 --- a/python/ray/includes/libcoreworker.pxd +++ b/python/ray/includes/libcoreworker.pxd @@ -379,8 +379,6 @@ cdef extern from "ray/core_worker/core_worker.h" nogil: int node_manager_port c_string raylet_ip_address c_string driver_name - c_string stdout_file - c_string stderr_file (CRayStatus( const CAddress &caller_address, CTaskType task_type, diff --git a/src/ray/core_worker/core_worker.cc b/src/ray/core_worker/core_worker.cc index 6c1d93c64ba8..5c64acbaeb9d 100644 --- a/src/ray/core_worker/core_worker.cc +++ b/src/ray/core_worker/core_worker.cc @@ -1301,13 +1301,6 @@ void CoreWorker::RegisterToGcs(int64_t worker_launch_time_ms, } } - if (!options_.stdout_file.empty()) { - worker_info.emplace("stdout_file", options_.stdout_file); - } - if (!options_.stderr_file.empty()) { - worker_info.emplace("stderr_file", options_.stderr_file); - } - auto worker_data = std::make_shared(); worker_data->mutable_worker_address()->set_raylet_id(rpc_address_.raylet_id()); worker_data->mutable_worker_address()->set_ip_address(rpc_address_.ip_address()); diff --git a/src/ray/core_worker/core_worker_options.h b/src/ray/core_worker/core_worker_options.h index 917a131b8e2c..a5c558b35ac6 100644 --- a/src/ray/core_worker/core_worker_options.h +++ b/src/ray/core_worker/core_worker_options.h @@ -80,8 +80,6 @@ struct CoreWorkerOptions { node_manager_port(0), raylet_ip_address(""), driver_name(""), - stdout_file(""), - stderr_file(""), task_execution_callback(nullptr), check_signals(nullptr), gc_collect(nullptr), @@ -138,10 +136,6 @@ struct CoreWorkerOptions { std::string raylet_ip_address; /// The name of the driver. std::string driver_name; - /// The stdout file of this process. - std::string stdout_file; - /// The stderr file of this process. - std::string stderr_file; /// Language worker callback to execute tasks. TaskExecutionCallback task_execution_callback; /// The callback to be called when shutting down a `CoreWorker` instance.