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

[UX - SkyServe] user now is able to select a LB policy from a range of options #4061

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

Conversation

AlexCuadron
Copy link

@AlexCuadron AlexCuadron commented Oct 10, 2024

I added the option to specify different LB policies, by default, RoundRobin is used. This PR is intended to enable easy switching between LB policies to facilitate its development.

The default behaviour (without user interaction) doesn't modify the execution flow and the user is not allowed to use any other LB policy other than round-robing without them being added explicitly.

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: conda deactivate; bash -i tests/backward_compatibility_tests.sh

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

This is awesome @AlexCuadron ! It will greatly expand our customizability. Left some discussion ;) We might also think of how to expose this feature to our end user, in our Service YAML - maybe add a load_balancing_policy section under service?

sky/serve/load_balancer.py Outdated Show resolved Hide resolved
sky/serve/load_balancer.py Outdated Show resolved Hide resolved
@AlexCuadron
Copy link
Author

@cblmemo Done! PTAL again :D

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Thanks @AlexCuadron for the awesome work! It mostly looks good to me. Left some discussions ;)

examples/serve/gorilla/gorilla.yaml Outdated Show resolved Hide resolved
sky/serve/load_balancer.py Outdated Show resolved Hide resolved
sky/serve/load_balancer.py Outdated Show resolved Hide resolved
sky/serve/load_balancer.py Outdated Show resolved Hide resolved
sky/serve/load_balancing_policies.py Outdated Show resolved Hide resolved
sky/serve/load_balancing_policies.py Outdated Show resolved Hide resolved
sky/serve/service_spec.py Outdated Show resolved Hide resolved
@AlexCuadron
Copy link
Author

Thanks for the comments @cblmemo, fixed and ready for next round 💪

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix @AlexCuadron ! Mostly looks good to me. Left some discussions.

btw, I created a branch here and lets merge our PR to the branch first. Merging into master might need more time and we want to move fast ;)

https://github.com/skypilot-org/skypilot/tree/heterogeneous-lb

sky/serve/load_balancing_policies.py Show resolved Hide resolved
@AlexCuadron AlexCuadron changed the base branch from master to heterogeneous-lb October 20, 2024 06:09
@AlexCuadron
Copy link
Author

I changed the base branch and updated based on comments :)
PTAL @cblmemo

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Thanks for the prompt fix @AlexCuadron ! Mostly looks good to me. Left some nits :))

examples/serve/misc/cancel/service.yaml Outdated Show resolved Hide resolved
examples/serve/llama2/llama2.yaml Outdated Show resolved Hide resolved
sky/serve/load_balancer.py Outdated Show resolved Hide resolved
sky/serve/service_spec.py Outdated Show resolved Hide resolved
sky/serve/service_spec.py Outdated Show resolved Hide resolved
@AlexCuadron
Copy link
Author

Done! PTAL @cblmemo :D

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Thanks for the prompt fix @AlexCuadron ! Left some final nits 🚀

examples/serve/load_balancing_policies_example.yaml Outdated Show resolved Hide resolved
sky/serve/load_balancer.py Outdated Show resolved Hide resolved
sky/serve/__init__.py Outdated Show resolved Hide resolved
AlexCuadron and others added 2 commits October 23, 2024 13:38
Co-authored-by: Tian Xia <cblmemo@gmail.com>
* [Catalog] Silently ignore TPU price not found.

* assert for non tpu v6e

* format
@AlexCuadron
Copy link
Author

Done! PTAL! @cblmemo

@AlexCuadron
Copy link
Author

AlexCuadron commented Oct 24, 2024

@cblmemo or @Michaelvll What changes would be needed for this PR to be merged into the master branch? That way, we won’t need to keep updating the #heterogeneous-lb branch.

@cblmemo cblmemo changed the base branch from heterogeneous-lb to master October 25, 2024 00:03
Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Actually, for exposing LB_POLICIES, pls check the comments. And I do think this should be able to merge to master - cc @Michaelvll for a look. @AlexCuadron I've changed the base branch to master, could you help merging the latest one?

sky/serve/service_spec.py Outdated Show resolved Hide resolved
sky/serve/service_spec.py Outdated Show resolved Hide resolved
sky/serve/__init__.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Sorry, doesn't mean to approve it - lets wait for other ppl's opinions.

@AlexCuadron
Copy link
Author

I have fixed it according to comments @cblmemo. PTAL @Michaelvll :)

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.

4 participants