Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[job submission] Remove jobs intermediate directory for logs #20192

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions python/ray/_private/job_manager/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,16 @@ def get_log_file_paths(self, job_id: str) -> Tuple[str, str]:
Get file paths to logs of given job. Example:

stdout:
/tmp/ray/session_date/logs/jobs/_ray_internal_job_logs_{job_id}.out
/tmp/ray/session_date/logs/job-driver-{job_id}.out
stderr:
/tmp/ray/session_date/logs/jobs/_ray_internal_job_logs_{job_id}.err
/tmp/ray/session_date/logs/job-driver-{job_id}.err
"""
session_dir = ray.worker._global_node.get_session_dir_path()
jobs_log_dir = os.path.join(session_dir + "/logs/jobs")
if not os.path.exists(jobs_log_dir):
os.mkdir(jobs_log_dir)

logs_dir = ray.worker._global_node.get_logs_dir_path()
stdout_file_name = f"{self.JOB_LOGS_STDOUT_KEY.format(job_id=job_id)}"
stderr_file_name = f"{self.JOB_LOGS_STDERR_KEY.format(job_id=job_id)}"

return (os.path.join(jobs_log_dir, stdout_file_name),
os.path.join(jobs_log_dir, stderr_file_name))
return (os.path.join(logs_dir, stdout_file_name),
os.path.join(logs_dir, stderr_file_name))


class JobStatusStorageClient:
Expand Down