8000 [Job] Ray job log streaming misses to report the last log line · Issue #46413 · ray-project/ray · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Job] Ray job log streaming misses to report the last log line  #46413
Open
@n30111

Description

@n30111

What happened + What you expected to happen

When streaming log from Ray Job, it fails to print the last log statement. The issue seems to be introduced in Ray 2.12 and continue to persist in 2.31. It works fine in Ray 2.10.

In the following example, it never prints the line I'm Ray

Versions / Dependencies

Ray 2.31
Python 3.11
Linux

Reproduction script

# hello.py
import os,time
print('hello')
time.sleep(2)
print("world")
time.sleep(2)
print("I'm Ray")
# submit.py
from ray.job_submission import JobSubmissionClient
client = JobSubmissionClient("http://127.0.0.1:8265")
job_id = client.submit_job(
    # Entrypoint shell command to execute
    entrypoint="python hello.py",
    # Path to the local directory that contains the script.py file
    runtime_env={"working_dir": "./"}
)
print(job_id)

logs_f = client.tail_job_logs(job_id)

async def test():
    async for line in logs_f:
        print(line)

import asyncio

asyncio.run(test())
ray start --head
python submit.py

Issue Severity

Medium: It is a significant difficulty but I can work around it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that is supposed to be working; but isn'tjobstriageNeeds triage (eg: priority, bug/not-bug, and owning component)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0