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

[Core] Add an API to retrieve the time it takes for a Ray Task to complete #50147

Open
japneet-anyscale opened this issue Jan 31, 2025 · 3 comments
Assignees
Labels
core Issues that should be addressed in Ray Core enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks

Comments

@japneet-anyscale
Copy link
Contributor

Description

Request for an API to retrieve the time it takes for a Ray Task to complete.

This is currently only available by clicking through the Ray Dashboard, time consuming if a Job has multiple Ray Tasks

Use case

No response

@japneet-anyscale japneet-anyscale added enhancement Request for new feature and/or capability triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jan 31, 2025
@jcotant1 jcotant1 added the core Issues that should be addressed in Ray Core label Jan 31, 2025
@marwan116
Copy link
Contributor

One small workaround you can probably make use of ray.util.state.list_tasks(detail=True) or ray list tasks --detail to get the list of tasks (the details show start time and end time)

@kevin85421 kevin85421 self-assigned this Feb 2, 2025
@kevin85421
Copy link
Member

I take a look at the function @marwan116 mentioned above and I think the user can use the workaround for now.

and users can provide a filter with job_id to get all tasks related to the job.

elif key == "job_id":

The drawback is that the API sends the request to Ray dashboard instead of GCS, but it is an OK workaround for short-term.

@jjyao jjyao added P1 Issue that should be fixed within a few weeks and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Feb 3, 2025
@jjyao jjyao assigned MengjinYan and unassigned kevin85421 Feb 3, 2025
@MengjinYan
Copy link
Collaborator

Just to add a little bit more context, the both the SDK and the CLI could work as short term workarounds.

The limitation is that, there is the 10k limit to the number of task returned when listing tasks. And also GCS will store at most 100k task information, so there will be task information loss if the job contains more than 100k tasks even if the number of returned tasks is less than 10k.

A longer term solution is being worked on between core and observability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

No branches or pull requests

6 participants