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

[Dashboard] Add job_id to task API calls + Show resource requirement for pg #32104

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

rkooo567
Copy link
Contributor

Signed-off-by: SangBin Cho [email protected]

Why are these changes needed?

  • Add job id to the task state API call. This will help us not including tasks from other jobs (so improve the experience when we have 10K+ tasks from the cluster).
  • Add resource requirement to the pg table.

idk what I am doing wrong, but the overflow doesn't work somehow. @alanwguo do you know how to handle this? I think we will need this for demo
Screen Shot 2023-01-31 at 3 24 13 AM

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: SangBin Cho <[email protected]>
Comment on lines +25 to +30
{bundles.map(({ unit_resources }, index) => {
return `{${Object.entries(unit_resources || {})
.map(([key, val]) => `${key}: ${val}`)
.join(", ")}}, `;
})}
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Group by bundle definition.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_.groupBy()

Comment on lines +5 to +13
export const getTasks = (jobId: string | null) => {
let url = "api/v0/tasks?detail=1&limit=10000";
if (jobId) {
url += `&job_id=${jobId}`;
}
return get<StateApiResponse<Task>>(url);
};

export const downloadTaskTimelineHref = (jobId: string) => {
return `/api/v0/tasks/timeline?job_id=${jobId}&download=1`;
export const downloadTaskTimelineHref = (jobId: string | null) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is jobId optional?

Copy link
Contributor Author

@rkooo567 rkooo567 Jan 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could be useful for things like serve in the future. I just did it because it is a simple change. Doesn't have to be included in this PR if you don't want to

Copy link
Contributor

@alanwguo alanwguo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving assuming feedback is addressed

@rkooo567 rkooo567 merged commit eb660ce into ray-project:master Feb 1, 2023
cadedaniel pushed a commit to cadedaniel/ray that referenced this pull request Mar 22, 2023
Signed-off-by: SangBin Cho <[email protected]>

Add job id to the task state API call. This will help us not including tasks from other jobs (so improve the experience when we have 10K+ tasks from the cluster).
Add resource requirement to the pg table.
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
Signed-off-by: SangBin Cho <[email protected]>

Add job id to the task state API call. This will help us not including tasks from other jobs (so improve the experience when we have 10K+ tasks from the cluster).
Add resource requirement to the pg table.

Signed-off-by: Edward Oakes <[email protected]>
scottsun94 pushed a commit to scottsun94/ray that referenced this pull request Mar 28, 2023
Signed-off-by: SangBin Cho <[email protected]>

Add job id to the task state API call. This will help us not including tasks from other jobs (so improve the experience when we have 10K+ tasks from the cluster).
Add resource requirement to the pg table.
cassidylaidlaw pushed a commit to cassidylaidlaw/ray that referenced this pull request Mar 28, 2023
Signed-off-by: SangBin Cho <[email protected]>

Add job id to the task state API call. This will help us not including tasks from other jobs (so improve the experience when we have 10K+ tasks from the cluster).
Add resource requirement to the pg table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants