Skip to content
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

Merged
merged 10 commits into from
Aug 2, 2023

Conversation

shayorshay
Copy link
Contributor

This PR adds a configurable node pool label in the pipeline specification. This is needed because the default label name differs per cloud provider.

@shayorshay shayorshay added the Core Core framework label Jul 31, 2023
Copy link
Contributor

@PhilippeMoussalli PhilippeMoussalli left a 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
Copy link
Contributor

@PhilippeMoussalli PhilippeMoussalli Jul 31, 2023

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:

def test_component_op(

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

@PhilippeMoussalli PhilippeMoussalli merged commit 30533bc into ml6team:main Aug 2, 2023
RobbeSneyders added a commit that referenced this pull request Aug 10, 2023
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.
@shayorshay shayorshay deleted the feature/node-pool-label branch September 5, 2023 09:07
Hakimovich99 pushed a commit that referenced this pull request Oct 16, 2023
This PR adds a configurable node pool label in the pipeline
specification. This is needed because the default label name differs per
cloud provider.
Hakimovich99 pushed a commit that referenced this pull request Oct 16, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Core framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants