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

Unable to plug-in default values to Pipeline #618

Closed
swiftdiaries opened this issue Jan 3, 2019 · 6 comments
Closed

Unable to plug-in default values to Pipeline #618

swiftdiaries opened this issue Jan 3, 2019 · 6 comments
Assignees

Comments

@swiftdiaries
Copy link
Member

I tried creating a custom pipeline but I'm ran into this error while compiling it.
ValueError: Default values of argument has to be type dsl.PipelineParam or its child.

@dsl.pipeline(
    name='Simple Pipeline for test',
    description='A simple pipeline for testing'
)
def run_step(project='some value'):

A workaround was to create a PipelineParam and then pass it.
project = dsl.PipelineParam(name='run-step-parameter')

But I'm unable to set default values to the parameter.
The default examples from here don't compile as well. I'm getting the same error.

@gaoning777
Copy link
Contributor

Which DSL Compiler version did you install?
It might be that your compiler is outdated.

@qimingj
Copy link
Contributor

qimingj commented Jan 7, 2019

The change to support direct values were checked in at 0b7120c#diff-618bb1fbca23caf0b3edc26f1b38caa8. Latest release of kfp SDK should have it. https://github.com/kubeflow/pipelines/releases

Make sure you install it with "--upgrade" flag.

@swiftdiaries
Copy link
Member Author

swiftdiaries commented Jan 7, 2019

Thank you for the reply.
I installed with the --upgrade flag, I tried it with a clean environment and a fresh install.
It still gives out the same error.

@Ark-kun
Copy link
Contributor

Ark-kun commented Jan 8, 2019

Thank you for the reply.
I installed with the --upgrade flag, I tried it with a clean environment and a fresh install.
It still gives out the same error.

Please try pip3 uninstall kfp and use pip3 to install it again. (You can also use python3 -m pip install to be extra sure that the env is the same) Also make sure your python and pip use the same virtual environments. I've experienced similar issues when I installed the package using pip (instead of pip3) which installed it into the python2 package location.

ValueError: Default values of argument has to be type dsl.PipelineParam or its child.

This error was removed from the code base several months ago.

@swiftdiaries
Copy link
Member Author

Thanks for the reply :) That worked. I mixed up my environments.
Closing this issue now.

@Ark-kun
Copy link
Contributor

Ark-kun commented Jan 9, 2019

/assign @Ark-kun

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

No branches or pull requests

4 participants