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

A more compatible way for concat a url in Kubeflow Pipeline/v2/Installation/Quickstart #3703

Closed
realnumber666 opened this issue Mar 27, 2024 · 3 comments

Comments

@realnumber666
Copy link

While I'm trying to lauch a KFP following the doc, I found that current URL concat way is not compatible when user set endpoint with a / in the end.

Current Doc Content

image

A Possible Mistake

from kfp import dsl
from kfp import client

@dsl.component
def addition_component(num1: int, num2: int) -> int:
    return num1 + num2

@dsl.pipeline(name='addition-pipeline')
def my_pipeline(a: int, b: int, c: int = 10):
    add_task_1 = addition_component(num1=a, num2=b)
    add_task_2 = addition_component(num1=add_task_1.output, num2=c)

endpoint = 'http://localhost:8080/'    # <= endpoint with a / in the end
kfp_client = client.Client(host=endpoint)
run = kfp_client.create_run_from_pipeline_func(
    my_pipeline,
    arguments={
        'a': 1,
        'b': 2
    }
)

url = f'{endpoint}/#/runs/details/{run.run_id}'
print(url)

Output

There will be a redundant '/' following 8080.
http://localhost:8080//#/runs/details/your_run_id_here

What We Can Do

I think we can use urllib other than just a simple string concat to avoiding this possible problem.

@varodrig
Copy link
Contributor

@realnumber666 the documentation was updated and content changed.
It seems the issue is no longer valid. Closing this issue. Please reach out if you need anything.

@varodrig
Copy link
Contributor

/close

Copy link

@varodrig: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-project-automation github-project-automation bot moved this from To Do to Closed in Needs Triage Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

2 participants