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

[SkyServe] Fix resource parse when multiple accelerators is used #2860

Merged
merged 8 commits into from
Dec 14, 2023

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Dec 13, 2023

This PR changed the representation of the request_resources field in service status. Now it will store a string to represent multiple accelerators, just like implementation for SkySpot.

service:
  readiness_probe: /
  replicas: 1

resources:
  accelerators: {L4:1, T4:1}
  ports: 8000

run: python3 -m http.server 8000

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • Previous YAML
    • Backward compatibility test: launch a service on the old version, switch to this branch and launch a new service. Everything works fine.
  • 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

Copy link
Collaborator

@Michaelvll Michaelvll 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 @cblmemo! Left several quick questions.

sky/cli.py Outdated Show resolved Hide resolved
sky/cli.py Show resolved Hide resolved
@@ -145,7 +140,7 @@ def _start(service_name: str, tmp_task_yaml: str, job_id: int):
controller_job_id=job_id,
policy=service_spec.policy_str(),
auto_restart=service_spec.auto_restart,
requested_resources=requested_resources,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why can't we still save the requested_resources, which can be a list or set of resources? It might be easier to process the resources information to have a object than a string?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After an offline discussion, since we still need to store the number of nodes, we decided to keep the current implementation.

cblmemo and others added 2 commits December 13, 2023 15:13
Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>
Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Just tried this PR with #2857 and it seems correctly fixed the issue! Thanks @cblmemo! LGTM.

sky/cli.py Outdated Show resolved Hide resolved
sky/serve/serve_utils.py Outdated Show resolved Hide resolved
Michaelvll added a commit that referenced this pull request Dec 14, 2023
cblmemo and others added 3 commits December 14, 2023 01:20
@cblmemo cblmemo merged commit 7e2c249 into master Dec 14, 2023
19 checks passed
@cblmemo cblmemo deleted the serve-fix-multi-resources-str branch December 14, 2023 10:18
Michaelvll added a commit that referenced this pull request Dec 15, 2023
* Add example for mixtral

* update the serve.yaml

* install dependencies

* remove useless file

* simplify port

* mixtral official doc

* fix model name

* Fix setup

* Add sky serve up and docs

* Use 2 replica instead

* Fix typo

* Add official doc

* fix

* fix

* nits

* Update llm/mixtral/README.md

Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>

* Update llm/mixtral/README.md

Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>

* Update sky/cli.py

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* Add method for accessing the models

* Address comment

* Add optional:

* Fix news

* Update README.md

Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>

* Add skyserve docs link

* lint

* Fix readme and adopt changes from #2860

* fix mixtral link

* fix link

---------

Co-authored-by: cblmemo <cblmemo@gmail.com>
Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>
remyleone pushed a commit to remyleone/skypilot that referenced this pull request Dec 26, 2023
…pilot-org#2860)

* fix

* fix

* nits

* Update sky/cli.py

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* lint

* Update sky/serve/serve_utils.py

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* comments

* print_exception_no_traceback

---------

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>
remyleone pushed a commit to remyleone/skypilot that referenced this pull request Dec 26, 2023
* Add example for mixtral

* update the serve.yaml

* install dependencies

* remove useless file

* simplify port

* mixtral official doc

* fix model name

* Fix setup

* Add sky serve up and docs

* Use 2 replica instead

* Fix typo

* Add official doc

* fix

* fix

* nits

* Update llm/mixtral/README.md

Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>

* Update llm/mixtral/README.md

Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>

* Update sky/cli.py

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* Add method for accessing the models

* Address comment

* Add optional:

* Fix news

* Update README.md

Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>

* Add skyserve docs link

* lint

* Fix readme and adopt changes from skypilot-org#2860

* fix mixtral link

* fix link

---------

Co-authored-by: cblmemo <cblmemo@gmail.com>
Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>
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