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

Simplify component naming #815

Merged
merged 4 commits into from
Jan 29, 2024
Merged

Conversation

GeorgesLorre
Copy link
Collaborator

This fixes the inconsistent folder names between runs (cached vs non-cached) and cleans up the different component/folder naming logic we have.

@@ -101,7 +101,7 @@ def __init__(
tags: t.Optional[t.List[str]] = None,
):
spec_dict: t.Dict[str, t.Any] = {
"name": name,
"name": self.sanitized_component_name(name),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This should be the only place where the incoming name is cleaned and stored

@@ -305,6 +300,10 @@ def _get_registry_path(name: str) -> Path:
raise ValueError(msg)
return component_dir

@property
def component_id(self) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to call this id here instead of name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll update it

@GeorgesLorre GeorgesLorre force-pushed the fix/inconsistent-component-naming branch from ec136ff to 69b3c5e Compare January 25, 2024 16:09
@GeorgesLorre GeorgesLorre marked this pull request as ready for review January 25, 2024 16:50
Copy link
Contributor

@mrchtr mrchtr left a comment

Choose a reason for hiding this comment

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

Thanks @GeorgesLorre!

@@ -353,48 +354,55 @@ def from_fondant_component_spec(
},
}

cleaned_component_name = fondant_component.sanitized_component_name

kfp_safe_name = (
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice name! Makes it clear.

},
},
},
"inputDefinitions": input_definitions,
},
"schemaVersion": "2.1.0",
"sdkVersion": "kfp-2.0.1",
"sdkVersion": "kfp-2.6.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Any side effects by increasing the version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, now it is in line with the KFP version we use now.

@GeorgesLorre GeorgesLorre merged commit ea6462e into main Jan 29, 2024
11 checks passed
@GeorgesLorre GeorgesLorre deleted the fix/inconsistent-component-naming branch January 29, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants