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][autoscaler] Add Pod names to the output of ray status -v #51192

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Mar 9, 2025

Why are these changes needed?

  1. Currently, the output of ray status -v only includes information on node types (i.e., group names in KubeRay) and Ray node IDs. However, it is not easy to map a Ray node ID to the name of the corresponding Ray Pod (i.e. instance id in Autoscaler).
Screenshot 2025-03-08 at 11 50 43 PM
  1. Refactor

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 added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/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 at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: kaihsun <[email protected]>
@kevin85421 kevin85421 changed the title [core][autoscaler v2] Add instance_id (Pod name) to the output of ray status -v [core][autoscaler v2] Add Pod names to the output of ray status -v Mar 9, 2025
@kevin85421 kevin85421 changed the title [core][autoscaler v2] Add Pod names to the output of ray status -v [core][autoscaler] Add Pod names to the output of ray status -v Mar 9, 2025
usage_by_node = {}
node_type_mapping = {}
idle_time_map = {}
def _node_usage_report(
Copy link
Member Author

Choose a reason for hiding this comment

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

cc @ryanaoleary I refactored this function a bit:

  1. Avoid passing the whole ClusterStatus to the function to make it more unit testable.
  2. It's not necessary to pass verbose into this function.
  3. Rename dictionaries to ....to.....

Signed-off-by: kaihsun <[email protected]>
@kevin85421
Copy link
Member Author

cc @ryanaoleary @rueian for review

@kevin85421 kevin85421 added the go add ONLY when ready to merge, run all tests label Mar 9, 2025
@kevin85421 kevin85421 marked this pull request as ready for review March 9, 2025 17:42
@kevin85421 kevin85421 requested a review from a team as a code owner March 9, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants