-
Notifications
You must be signed in to change notification settings - Fork 93
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
Yaml config sets #2876
base: main
Are you sure you want to change the base?
Yaml config sets #2876
Conversation
Runnnig with this file: # config_set.yaml
metadata:
name: scratch
nebari_version: ">2024.11.2"
description: A scratch config set
config:
google_cloud_platform:
node_groups:
gpu-tesla-t4-x1:
instance: "n1-standard-16"
min_nodes: 0
max_nodes: 4
guest_accelerators:
- name: nvidia-tesla-t4 # 1x 16 GB GDDR6: Nividia Tesla T4
count: 1
gpu-tesla-t4-x2:
instance: "n1-standard-16"
min_nodes: 0
max_nodes: 4
guest_accelerators:
- name: nvidia-tesla-t4 # 2x 16 GB GDDR6: Nividia Tesla T4
count: 2
gpu-tesla-t4-x4:
instance: "n1-standard-16"
min_nodes: 0
max_nodes: 4
guest_accelerators:
- name: nvidia-tesla-t4 # 4x 16 GB GDDR6: Nividia Tesla T4
count: 4
gpu-ampere-a100-x1:
instance: a2-highgpu-1g # 1x 40 GB HBM2: Nvidia Ampere A100
min_nodes: 0
max_nodes: 1 resulted in this nebari config file.
|
6d00535
to
8fea4db
Compare
|
|
||
class ConfigSetMetadata(BaseModel): | ||
model_config: ConfigDict = ConfigDict(extra="allow", arbitrary_types_allowed=True) | ||
name: str # for use with guided init |
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.
If none
is allowed here, shouldn't the type be Optional[str] = None
?
test_version = "2024.12.2" | ||
|
||
|
||
def test_valid_version_requirement(): |
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.
Can we parameterize this test with a few different version strings to ensure it works in all the allowed formats? ideally including pre-release versions.
assert metadata.nebari_version.specifier.contains(test_version) | ||
|
||
|
||
def test_invalid_version_requirement(): |
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.
This could be parameterized too to validate multiple invalid types
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.
Overall, looking good, and does what it says, just a couple of minor issues that I see.
Reference Issues or PRs
Related to #2865
What does this implement/fix?
Put a
x
in the boxes that applyTesting
How to test this PR?
Run command in #2876 (comment) and see if result matches. Check that nodes are in the expected order: (general, user, worker, then gpu nodes)
Any other comments?