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

Support local file upload when creating new pipeline version #2977

Closed
jingzhang36 opened this issue Feb 4, 2020 · 16 comments
Closed

Support local file upload when creating new pipeline version #2977

jingzhang36 opened this issue Feb 4, 2020 · 16 comments
Assignees
Labels

Comments

@jingzhang36
Copy link
Contributor

No description provided.

@Bobgy
Copy link
Contributor

Bobgy commented Feb 27, 2020

@jingzhang36 I think all work is done here, is that right?
Can you link all relevant PRs for tracking purpose?

Added a PR for api client on version upload below.

I believe we can close this issue.

@pselden
Copy link
Contributor

pselden commented Feb 27, 2020

Does the sdk still need to be updated? I looked through some of the client.py files and couldn't find anything related to this.

@Bobgy
Copy link
Contributor

Bobgy commented Feb 29, 2020

@numerology @Ark-kun Do you know answer to above question?
Is regenerating server api client enough? (I did that in 0.2.5 release)

@jingzhang36
Copy link
Contributor Author

I feel using the generated server api client would be ok as long as I can find a way to load a local file to io object and pass to the generated api method. Let me try to make up an example and post it here

@jingzhang36
Copy link
Contributor Author

jingzhang36 commented Mar 5, 2020

@pselden with kfp 0.2.5, you can do

import os
import kfp
myfile = os.path.join(<your local pipeline file>)
client = kfp.Client(<host>)
client.pipeline_uploads.upload_pipeline_version(myfile, pipelineid=<id of the pipeline you want to create version under>, name=<version name by your choice>)

Also note: pipelineid and name are both strings.

@Bobgy
Copy link
Contributor

Bobgy commented Mar 5, 2020

To add to above comment, you also need to upgrade kfp-server-api package to 0.2.5

@pselden
Copy link
Contributor

pselden commented Mar 5, 2020

Thanks. Do you happen to know if this will be added to the CLI as well?

Something like kfp pipelines upload --name <name> --version <version>?

@pahask8
Copy link
Contributor

pahask8 commented Mar 6, 2020

@pselden with kfp 0.2.5, you can do

import os
import kfp
myfile = os.path.join()
client = kfp.Client()
client.pipeline_uploads.upload_pipeline_version(myfile, pipelineid=, name=)

Also note: pipelineid and name are both strings.

@jingzhang36 Thank you for sharing this example. Right now the kfp package does not support this version:

kfp-server-api >= 0.1.18, < 0.1.19
. Will it be updated soon?
Thank you

@numerology
Copy link

Will it be updated soon?

Sorry for the confusion. kfp-server-api does not have a consistent version number with KFP SDK package.

So if you deploy KFP with version 0.2.5 and use KFP SDK version higher than 0.2.5, it works.

@Bobgy
Copy link
Contributor

Bobgy commented Mar 6, 2020

@numerology I just released kfp-server-api 0.2.5
Looks like we need to update

'kfp-server-api >= 0.1.18, <= 0.1.40', #Update the upper version whenever a new version of the kfp-server-api package is released. Update the lower version when there is a breaking change in kfp-server-api.

@numerology
Copy link

@numerology I just released kfp-server-api 0.2.5
Looks like we need to update

'kfp-server-api >= 0.1.18, <= 0.1.40', #Update the upper version whenever a new version of the kfp-server-api package is released. Update the lower version when there is a breaking change in kfp-server-api.

Ah got it.

@pselden
Copy link
Contributor

pselden commented Mar 18, 2020

Just checking -- this is NOT available in any officially published version of the KFP client sdk right?

@Bobgy
Copy link
Contributor

Bobgy commented Mar 27, 2020

@pselden it's available in 0.2.5 and 0.3.0.
Refer to #2977 (comment)

but you need to make sure your kfp server is the same version.

@Tauranis
Copy link

Unfortunately, uploading a new version is crashing.

When I run

kfp --endpoint <URL> pipeline upload-version -p <PIPE_ID> -v <PIPE_VERSION> ./dist/pipeline.tar.gz

It throws (500) Bad Request. Reason: Internal Server Error

The same happens when I use the Python SDK

import os
import kfp
client = kfp.Client()
client.pipeline_uploads.upload_pipeline_version(<FILE>, pipelineid=<PIPE_ID>, name=<PIPE_VERSION>)

Currently I'm using Kubeflow deployed at Google AI Platform with kfp==0.5.1 and kfp-server-api==0.5.0

Does someone else have the same problem?

@Ark-kun Ark-kun reopened this May 20, 2020
@jingzhang36
Copy link
Contributor Author

jingzhang36 commented May 21, 2020

I tested with kfp===0.4.0 kfp-server-api===0.3.9 and kfp standalone deployment with 0.5.1
By following the example at https://www.kubeflow.org/docs/pipelines/tutorials/sdk-examples/
I can not reproduce the error.
So that means the API server's feature is fine. Suspecting issues with cluster setting up.
Since this Github issue is for feature request and the feature is good per my test, let's close this one and open another issue for investigating the particular user issue with @Tauranis deployment.
@Tauranis, do you mind moving to #3805?

@Tauranis
Copy link

I found the error.
I was passing the pipeline name and not the pipeline id.
My bad. Sorry.

For those who want to get the pipeline id from its name the following will work.

PIPELINE_ID=$(kfp --endpoint ${KUBEFLOW_ENDPOINT} pipeline list | grep -w  ${PIPELINE_NAME}  | grep -E -o -e "([a-z0-9]){8}-([a-z0-9]){4}-([a-z0-9]){4}-([a-z0-9]){4}-([a-z0-9]){12}")

I'm currently using this for my CI/CD pipeline.

magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this issue Oct 22, 2023
* add condition checks for False and Unknown

Signed-off-by: Tessa Pham <[email protected]>

* fix IngressReady condition

Signed-off-by: Tessa Pham <[email protected]>

---------

Signed-off-by: Tessa Pham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants