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

chore(components): Goolge - AI Platform - Improved component generation #5623

Conversation

Ark-kun
Copy link
Contributor

@Ark-kun Ark-kun commented May 10, 2021

Components - Goolge - AI Platform - Improved component generation

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.

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.
@Ark-kun
Copy link
Contributor Author

Ark-kun commented May 10, 2021

/retest

Copy link
Contributor

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

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:

Suggested change
component_param_type = metadata_type
component_param_type, input_type = metadata_type, InputPathPlaceholder

then

input_args.append(input_type(input_name=key))

below

Copy link
Contributor Author

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.

@google-oss-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sasha-gitg
Copy link
Contributor

Thanks Alexey! @SinaChavoshi PTAL

@google-oss-robot google-oss-robot merged commit 7205e73 into kubeflow:master May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants