skypilot icon indicating copy to clipboard operation
skypilot copied to clipboard

[UX/show-gpus] Improve sorting.

Open concretevitamin opened this issue 1 year ago • 0 comments

Previous, prices across clouds + within cloud are not sorted properly.

This PR:

        # For each gpu name (count not included):
        #   - Group by cloud
        #   - Sort within each group by prices
        #   - Sort groups by each cloud's (min price, min spot price)

Comparison: two text files in https://gist.github.com/concretevitamin/1fda666bfa129aedd3a3ced485e8f05c

Speed seems the same:

#!/bin/bash
set -ex

export BASH_XTRACEFD=1

sky show-gpus L4
sky show-gpus L4:1
sky show-gpus L4:1 --all-regions
sky show-gpus L4 --cloud aws

sky show-gpus A100
sky show-gpus A100:8
sky show-gpus A100:8 --all-regions
sky show-gpus A100:8 --cloud aws
master: median 15.454 total

15.454 total
14.471 total
16.712 total

PR: median 15.391 total
15.391 total
15.497 total
14.612 total

Tested (run the relevant ones):

  • [ ] Code formatting: bash format.sh
  • [ ] Any manual or new tests for this PR (please specify below)
  • [ ] All smoke tests: pytest tests/test_smoke.py
  • [ ] Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • [ ] Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

concretevitamin avatar Apr 27 '24 01:04 concretevitamin