-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add node pool label #327
Add node pool label #327
Conversation
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.
Thanks @shayorshay ! :)
This will come in handy for different clouds. Left one small comments to handle edge cases and maybe add a test for it.
@@ -80,6 +82,7 @@ def __init__( | |||
self.arguments.setdefault("component_spec", self.component_spec.specification) | |||
|
|||
self.number_of_gpus = number_of_gpus | |||
self.node_pool_label = node_pool_label | |||
self.node_pool_name = node_pool_name | |||
self.p_volumes = p_volumes | |||
self.ephemeral_storage_size = ephemeral_storage_size |
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.
Since both the label and the name depend on each other. Can you raise an error if one of them is not provided?
from fondant.exceptions import InvalidPipelineDefinition
if bool(node_pool_label) != bool(node_pool_name):
raise InvalidPipelineDefinition("Both 'node_pool_label' and 'node_pool_name' must be defined or both must be None.")
And can you also test that a valid error is returned by adding two example to test_component_op
, one where the name is defined and the label is not and the other way around:
fondant/tests/test_pipeline.py
Line 35 in 5b123bf
def test_component_op( |
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 added the error checking and test. Could you please check? @PhilippeMoussalli
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.
Thanks :)
Our current example pipelines don't work anymore out of the box since #327 requires `node_pool_label` and `node_pool_name` to either both be set, or neither. This PR removes the `node_pool_name` since it is very specific to our own kfp cluster anyway.
This PR adds a configurable node pool label in the pipeline specification. This is needed because the default label name differs per cloud provider.
Our current example pipelines don't work anymore out of the box since #327 requires `node_pool_label` and `node_pool_name` to either both be set, or neither. This PR removes the `node_pool_name` since it is very specific to our own kfp cluster anyway.
This PR adds a configurable node pool label in the pipeline specification. This is needed because the default label name differs per cloud provider.