-
Notifications
You must be signed in to change notification settings - Fork 1k
[Resources] Add cpus in resource specification
#1622
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
Merged
Merged
Changes from 50 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
d5b5511
Add cpu option
WoosukKwon 3e0fa4a
yapf
WoosukKwon 22fe74b
Add cpu in CLI
WoosukKwon 386b1dc
Fix GCP and Do not raise errors
WoosukKwon 23a0ea5
yapf
WoosukKwon 28b0c5a
Fix TPU VM
WoosukKwon 0d8cf90
Print error msg for cpu mismatches
WoosukKwon a825cf7
Fix error when default instance is not found
WoosukKwon d65634c
Merge branch 'master' into woosuk-cpu
WoosukKwon 4959f8f
Fix a comment
WoosukKwon 5d57fd5
Minor
WoosukKwon 9067308
Add _impl
WoosukKwon 797a632
Define _DEFAULT_NUM_VCPUS as constant
WoosukKwon b4e0b00
yapf
WoosukKwon b95c56b
Ban specifying CPU in sky exec
WoosukKwon 9324e52
yapf
WoosukKwon 12f4bbe
Fix type error
WoosukKwon 09ad032
xlarge -> large
WoosukKwon 83a7a9d
Fix AWS
WoosukKwon c400dea
Fix comments on default instance family
WoosukKwon 75cf94a
Fix sky exec
WoosukKwon afd80fe
minor
WoosukKwon 89ba768
Rename
WoosukKwon e4ae323
fuzzy_candidate_list -> []
WoosukKwon 6103c2e
Fix version up comment
WoosukKwon 1961191
Minor
WoosukKwon f856b66
Fix help msg
WoosukKwon 40ac63b
Add docstring for cpu
WoosukKwon 2ac7471
Document get_default_instance_type
WoosukKwon 62f78a2
prevent sky launch -c --cpu and sky exec --cpu
WoosukKwon b141f75
Minor fix
WoosukKwon bc7cd0a
cpu -> cpus
WoosukKwon a6f4355
yapf
WoosukKwon 8033bbf
vcpus -> vCPUs
WoosukKwon add2811
n2 -> n2-standard
WoosukKwon aa926af
Fix docstring
WoosukKwon 0368415
Add comment on assertion
WoosukKwon 54faa77
Fix docstring
WoosukKwon 8f9dabc
Fix docstring
WoosukKwon 97dc60e
Add assert in less_demanding_than
WoosukKwon 4599f36
roll back
WoosukKwon 01021c9
Merge branch 'master' into woosuk-cpu
WoosukKwon 4949000
Remove is_same_resources
WoosukKwon fec1b7a
Add TODO
WoosukKwon 13607fd
Check cpus format again in _filter_with_cpus
WoosukKwon 2059309
yapf
WoosukKwon 6a2b554
Add tests
WoosukKwon 99a66e7
Fix tests
WoosukKwon ad4827b
Fix
WoosukKwon 2c08184
Fix
WoosukKwon 014f63c
Fix tests
WoosukKwon 1f8a031
Merge branch 'master' into woosuk-cpu
WoosukKwon 62aa150
Fix example_app
WoosukKwon 4ea39d7
Add cpus in yaml spec
WoosukKwon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For discussion/a thought: This is now dynamically picking a VM type based on
cpu, which means it's no longer a "default" constant. More like aservice_catalog.get_instance_type_for_cpu()a la L371.Should we remove this interface (Cloud.get_default_instance_type()) then? Wdyt? (I can see arguments for both choices.)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it cannot be
get_instance_type_for_cpu()because it limits the search space to the default instance family and uses 8 as the default number of the vCPUs. I thinkget_default_instance_typeis fine; one can easily understand what it means.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming part sounds good. Sorry, I did not spell out in my comment but was thinking removing one interface from Cloud will make it easier to add new clouds. Also, it's a shallow method (1-line dispatch). How about removing it and just calling
service_catalog.get_default_instance_type()directly here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be still useful to explicitly show what the default type is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind clarifying what you meant?
Currently, the Cloud interface includes a shallow method, which does not show the default type:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean one can easily find which instance type is default for AWS by calling
AWS.get_default_instance_type, which is good.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.