-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
chore(components): Goolge - AI Platform - Improved component generation #5623
chore(components): Goolge - AI Platform - Improved component generation #5623
Conversation
Generating YAML text from strings is very fragile. It's more resilient to create components.structures.ComponentSpec object which can be serialized, loaded and instantiated.
/retest |
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.
/lgtm
@@ -532,45 +535,55 @@ def component_yaml_generator(**kwargs): | |||
kfp.dsl._pipeline_param.PipelineParam) or serializer: | |||
if is_mb_sdk_resource_noun_type(param_type): | |||
metadata_type = map_resource_to_metadata_type(param_type)[1] | |||
component_param_type, component_type = metadata_type, 'inputPath' | |||
component_param_type = metadata_type |
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 do something like:
component_param_type = metadata_type | |
component_param_type, input_type = metadata_type, InputPathPlaceholder |
then
input_args.append(input_type(input_name=key))
below
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 is possible, although I'm not sure it's more readable.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sasha-gitg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks Alexey! @SinaChavoshi PTAL |
Generating YAML text from strings is very fragile.
It's more resilient to create components.structures.ComponentSpec object which can be serialized, loaded and instantiated.