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

kfp.Client: Can't specify localhost host #4277

Closed
discordianfish opened this issue Jul 27, 2020 · 6 comments
Closed

kfp.Client: Can't specify localhost host #4277

discordianfish opened this issue Jul 27, 2020 · 6 comments
Assignees
Labels
area/sdk/client kind/bug priority/p2 status/triaged Whether the issue has been explicitly triaged

Comments

@discordianfish
Copy link
Member

What steps did you take:

client = kfp.Client(host="http://localhost:8888")
...
client.upload_pipeline(filename, name, description)

What happened:

Traceback (most recent call last):
  File "../kubeflow-apply/kubeflow-apply.py", line 73, in <module>
    args.func()
  File "../kubeflow-apply/kubeflow-apply.py", line 33, in pipelines
    self.client.upload_pipeline(filename, name, description)
  File "/usr/local/lib/python3.8/site-packages/kfp/_client.py", line 723, in upload_pipeline
    response = self._upload_api.upload_pipeline(pipeline_package_path, name=pipeline_name, description=description)
  File "/usr/local/lib/python3.8/site-packages/kfp_server_api/api/pipeline_upload_service_api.py", line 83, in upload_pipeline
    return self.upload_pipeline_with_http_info(uploadfile, **kwargs)  # noqa: E501
  File "/usr/local/lib/python3.8/site-packages/kfp_server_api/api/pipeline_upload_service_api.py", line 177, in upload_pipeline_with_http_info
    return self.api_client.call_api(
  File "/usr/local/lib/python3.8/site-packages/kfp_server_api/api_client.py", line 379, in call_api
    return self.__call_api(resource_path, method,
  File "/usr/local/lib/python3.8/site-packages/kfp_server_api/api_client.py", line 196, in __call_api
    response_data = self.request(
  File "/usr/local/lib/python3.8/site-packages/kfp_server_api/api_client.py", line 422, in request
    return self.rest_client.POST(url,
  File "/usr/local/lib/python3.8/site-packages/kfp_server_api/rest.py", line 279, in POST
    return self.request("POST", url,
  File "/usr/local/lib/python3.8/site-packages/kfp_server_api/rest.py", line 196, in request
    r = self.pool_manager.request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/request.py", line 79, in request
    return self.request_encode_body(
  File "/usr/local/lib/python3.8/site-packages/urllib3/request.py", line 172, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/usr/local/lib/python3.8/site-packages/urllib3/poolmanager.py", line 326, in urlopen
    conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)
  File "/usr/local/lib/python3.8/site-packages/urllib3/poolmanager.py", line 231, in connection_from_host
    raise LocationValueError("No host specified.")
urllib3.exceptions.LocationValueError: No host specified.

What did you expect to happen:

Being able to specify the host

Environment:

KFP SDK version: 1.0.0

Anything else you would like to add:

The problem is that for unclear reasons kfp strips the schema from the url, causing urllib3's parse_url to interpret the 'localhost' part as schema. This was working with kfp==0.1.31

@Bobgy Bobgy added priority/p0 kind/bug status/triaged Whether the issue has been explicitly triaged area/sdk/client labels Jul 28, 2020
@Bobgy
Copy link
Contributor

Bobgy commented Jul 28, 2020

also
/cc @numerology

@discordianfish
Copy link
Member Author

This has been broken since 0.4.0 with 0.3.0 working. So must be something in 0.3.0...0.4.0

@rmgogogo
Copy link
Contributor

import kfp
client = kfp.Client(host='https://19b3ea4f841c52a3-dot-us-central2.pipelines.googleusercontent.com')
client.list_pipelines()

I tested it and it works well.

Do you mean localhost?

@rmgogogo rmgogogo changed the title kfp.Client: Can't specify host kfp.Client: Can't specify localhost host Jul 28, 2020
@rmgogogo
Copy link
Contributor

to be fixed in #4285

@nlarusstone
Copy link

This is a blocking issue for us -- is there a plan to release a patch for 1.0.0?

@Bobgy
Copy link
Contributor

Bobgy commented Sep 3, 2020

@nlarusstone 1.0.1 will be released in a week

Jeffwan pushed a commit to Jeffwan/pipelines that referenced this issue Dec 9, 2020
Bobgy pushed a commit to Bobgy/pipelines that referenced this issue Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sdk/client kind/bug priority/p2 status/triaged Whether the issue has been explicitly triaged
Projects
None yet
Development

No branches or pull requests

4 participants