-
Notifications
You must be signed in to change notification settings - Fork 312
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
[develop] Introduce InstanceRequirements schema and resource #5419
base: develop
Are you sure you want to change the base?
Conversation
Add InstanceRequirementsDefinition class to hold all the attributes required to define a ComputeResource. Add a InstanceRequirementsComputeResource to model a ComputeResource defined through IntanceRequirements. Signed-off-by: Nicola Sirena <[email protected]>
a27eb67
to
07aa96f
Compare
Add InstanceRequirementsSchema class to define the customer facing contract of the feature. Extends SlurmComputeResourceSchema to support InstanceRequirementsSchema definitions. Signed-off-by: Nicola Sirena <[email protected]>
Signed-off-by: Nicola Sirena <[email protected]>
Signed-off-by: Nicola Sirena <[email protected]>
A set of InstanceRequirements may return a long list of instance-types (or none) depening on the attributes, the region and the architecture. Signed-off-by: Nicola Sirena <[email protected]>
07aa96f
to
2a45dac
Compare
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 just opened the patch and left some comments, but I didn't look at the whole patch.
@@ -8,6 +8,7 @@ CHANGELOG | |||
- Allow configuration of static and dynamic node priorities in Slurm compute resources via the ParallelCluster configuration YAML file. | |||
- Add support for Ubuntu 22. | |||
- Allow memory-based scheduling when multiple instance types are specified for a Slurm Compute Resource. | |||
- Allow definition of a Slurm Compute Resource through InstanceRequirements. |
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.
nit: InstanceRequirements
} | ||
|
||
response = self._client.get_instance_types_from_instance_requirements(config) | ||
if "InstanceTypes" in response: |
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.
nit: you could write:
instance_types = response.get("InstanceTypes", [])
return [res.get("InstanceType") for res in instance_types]
or:
return [instance_types.get("InstanceType") for instance_types in response.get("InstanceTypes", [])]
if self.accelerator_count > 0: | ||
self.accelerator_types = ["gpu"] | ||
self.accelerator_manufacturers = ["nvidia"] | ||
else: |
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 you're forcing a specific behaviour you can avoid the set in the previous lines, that is useless:
self.accelerator_types = accelerator_types
self.accelerator_manufacturers = accelerator_manufacturers
Description of changes
Tests
References
Checklist