Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

[Core][CLI] fix ray status long decimal numbers#43480

Open
hongchaodeng wants to merge2 commits intoray-project:master
base:master
Choose a base branch
Loading
fromhongchaodeng:fix-format

Conversation

hongchaodeng
Copy link
Member

@hongchaodenghongchaodeng commentedFeb 28, 2024
edited
Loading

Why are these changes needed?

Related issue number

Closes#42491

Checks

  • I've signed off every commit(by using the -s flag, i.e.,git commit -s) in this PR.
  • I've runscripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed forhttps://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it indoc/source/tune/api/ under the
      corresponding.rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures athttps://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@jjyao
Copy link
Collaborator

Could you add some tests?

hongchaodeng reacted with thumbs up emoji

@hongchaodeng
Copy link
MemberAuthor

@jjyao Sure. Will do.

@hongchaodenghongchaodengforce-pushed thefix-format branch 3 times, most recently from244dc31 toc90827eCompareMarch 5, 2024 22:15
@hongchaodeng
Copy link
MemberAuthor

hongchaodeng commentedMar 5, 2024
edited
Loading

Done! This code path is test covered too.

@hongchaodenghongchaodeng requested a review fromjjyaoMarch 5, 2024 22:16
@hongchaodenghongchaodengforce-pushed thefix-format branch 3 times, most recently fromcf8cceb to8f62a81CompareMarch 6, 2024 00:34
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>Signed-off-by: hongchaodeng <hongchaodeng1@gmail.com>
Copy link
Member

@rickyyxrickyyx left a comment

Choose a reason for hiding this comment

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

Approach looks good to me!

Just not sure what's the best UX here - pinging Huaiwei for some expertise here.

@@ -650,6 +650,17 @@ def parse_usage(usage: Usage, verbose: bool) -> List[str]:
return usage_lines


def format_resource(number):
Copy link
Member

Choose a reason for hiding this comment

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

if we do with 2 decimal places - we should rename the function.

@@ -563,8 +563,8 @@ def test_cluster_status_formatter():
Resources
--------------------------------------------------------
Total Usage:
0.5/3.0 CPU
Copy link
Member

Choose a reason for hiding this comment

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

the old one actually looks better to me.

@scottsun94 could you maybe chime in here - what's the best way to show decimal places in your opinion?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. It does feel that something is broken when I see something like0.01/4 GPU

I don't know what's the best solution here. What if we only keep the decimal places the same/consistent before and after/ on the same row?

Something like?

1/3 CPU1.01/4.00 GPU0.5/3.0 CPU0.01/2.00 GPU2/4 CPU0.51/1.00 GPU0/1 CPU0/2 GPU

@rickyyx
Copy link
Member

btw - we use assignees for PR reviews.

Copy link
Contributor

@rkooo567rkooo567 left a comment

Choose a reason for hiding this comment

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

Isn't this more likely a bug from floating point calculation in the scheduler layer? IIUC this approach won't work if there are resources that are smaller than 0.01?

@hongchaodenghongchaodeng changed the title[CLI] fix ray status long decimal numbers[Core][CLI] fix ray status long decimal numbersMar 6, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@scottsun94scottsun94scottsun94 left review comments

@rickyyxrickyyxrickyyx left review comments

@rkooo567rkooo567rkooo567 left review comments

@ericlericlAwaiting requested review from ericl

@architkulkarniarchitkulkarniAwaiting requested review from architkulkarni

@jjyaojjyaoAwaiting requested review from jjyao

At least 1 approving review is required to merge this pull request.

Assignees

@hongchaodenghongchaodeng

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[core][autoscaler] Formatting ray status for long decimal numbers
5 participants
@hongchaodeng@jjyao@rickyyx@scottsun94@rkooo567

[8]ページ先頭

©2009-2025 Movatter.jp