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

SDK/Components/PythonContainerOp - Switch from dict to ComponentSpec #396

Conversation

Ark-kun
Copy link
Contributor

@Ark-kun Ark-kun commented Nov 28, 2018

This changes the interface between PythonContainerOp and materializer from schema-less dict to ComponentSpec. This ensures the interface is not silently broken.

This change is Reviewable

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Nov 28, 2018

/test presubmit-e2e-test

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Nov 28, 2018

implementation=ImplementationSpec(
container=ContainerSpec(
image=target_image,
#command=['python3', program_file], #TODO: Include the command line
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need the command right? The entrypoint is already built into the image. So remove the commented line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Command line needs to be known for the operations to be manageable. I think we should promote this. In this particular case this would require small refactoring.

@qimingj
Copy link
Contributor

qimingj commented Nov 30, 2018

/lgtm

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Nov 30, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ark-kun

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

1 similar comment
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ark-kun

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

component_spec = ComponentSpec(
name=component_name,
description=component_description,
inputs=[InputSpec(name=input_name, type='str') for input_name in input_names], #TODO: Chnage type to actual type
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to change the type to actual type.
The component built already does the serialization, thus the types here are all strings.

@k8s-ci-robot k8s-ci-robot merged commit 98cc6ee into master Nov 30, 2018
@Ark-kun Ark-kun deleted the avolkov/SDK/Components/PythonContainerOp---Switch-from-dict-to-ComponentSpec branch January 15, 2019 22:09
HumairAK pushed a commit to red-hat-data-services/data-science-pipelines that referenced this pull request Mar 11, 2024
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