[Resources] Add memory in resources#1746
Merged
Michaelvll merged 22 commits intomasterfrom Mar 15, 2023
Merged
Conversation
1 task
1 task
WoosukKwon
approved these changes
Mar 10, 2023
Collaborator
WoosukKwon
left a comment
There was a problem hiding this comment.
Great job! Thanks for the PR. Left some minor comments.
juanmichelini
pushed a commit
to LCA-CI-builds-repair/skypilot
that referenced
this pull request
Jul 10, 2025
* Add support for memory filtering * Fix memory filtering * rename to memory_gb * format * lint * linting * linting * Rename memory-gb to memory and fix lambda * reset ux_utils * Fix instance family for Azure * Do not expose the 'x' API of the memory to the users * Add test for memory * Add test for the instance types chosen * format * discard `x` for high level memory APIs * float equal check * address comments * Add cpu types * fix comment for TPU
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1673, this simulates the behavior of
cpusin resources, thanks to the great effort from @WoosukKwon in #1622Added a memory filtering field for the resources:
memory: 16the memory should be 16GBmemory: 16+the memory should be more than 16GB(Not expose this API as it might be confusing)memory: 4xthe memory to core ratio should be larger than 4 times.Logics for choosing the CPU instance to use:
Use the general-purpose CPU instance by default, when the
--memoryis not specifiedUse the cheapest CPU instance that satisfies the requirement, when the
--memoryis specified.sky launch -c normalsky launch -c cpus --cpus 32+: general purposesky launch -c compute-optimized --cpus 32+ --memory 32+sky launch -c memory-optimized --memory 32+Tested (run the relevant ones):
pytest tests/test_optimizer_dryruns.pywith added memory related unit tests.pytest tests/test_smoke.pypytest tests/test_smoke.py::test_fill_in_the_namebash tests/backward_comaptibility_tests.sh