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

[Minor] Improve completion of accelerator name when cloud is specified #3014

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

Michaelvll
Copy link
Collaborator

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

Copy link
Member

@concretevitamin concretevitamin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @Michaelvll.

accelerator_registry.canonicalize_accelerator_name(acc):
acc_count for acc, acc_count in accelerators.items()
accelerator_registry.canonicalize_accelerator_name(
acc, self._cloud): acc_count
Copy link
Member

Choose a reason for hiding this comment

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

Minor: What happens if a user has 1 cloud only as indicated by sky check but self._cloud is not specified? I guess we can leave that to the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That is a good point! We can consider inferring the cloud for the whole Resources when only one cloud is enabled. Let's leave it to the future as that may need more test. : )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, this might be debatable, as this may make an original working yaml fails, if a user add a new cloud.

@Michaelvll Michaelvll merged commit 70a7435 into master Jan 26, 2024
19 checks passed
@Michaelvll Michaelvll deleted the completion-for-acc-when-cloud-specified branch January 26, 2024 19:08
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.

2 participants