2

我在本地环境中运行 Kubeflow Pipelines,以及 JupyterLab 和 Elyra 扩展。我创建了一个笔记本管道并按如下方式配置了运行时配置,将 api_endpoint 设置为http://localhost:31380/pipeline(禁用了安全性)。尝试运行管道时会显示以下错误消息:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/tornado/web.py", line 1703, in _execute
    result = await result
  File "/usr/local/lib/python3.8/site-packages/elyra/pipeline/handlers.py", line 89, in post
    response = await PipelineProcessorManager.instance().process(pipeline)
  File "/usr/local/lib/python3.8/site-packages/elyra/pipeline/processor.py", line 70, in process
    res = await asyncio.get_event_loop().run_in_executor(None, processor.process, pipeline)
  File "/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/elyra/pipeline/processor_kfp.py", line 100, in process
    raise lve
  File "/usr/local/lib/python3.8/site-packages/elyra/pipeline/processor_kfp.py", line 89, in process
    client.upload_pipeline(pipeline_path,
  File "/usr/local/lib/python3.8/site-packages/kfp/_client.py", line 720, 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 378, 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 195, in __call_api
    response_data = self.request(
  File "/usr/local/lib/python3.8/site-packages/kfp_server_api/api_client.py", line 421, 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 171, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/usr/local/lib/python3.8/site-packages/urllib3/poolmanager.py", line 325, 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.
4

1 回答 1

3

根本原因是kfp随 Elyra v1.4.1(及更低版本)分发的 Kubeflow Pipelines 软件包版本 1.0.0 中存在问题。要解决此问题,请在运行时配置中替换localhost127.0.0.1,例如http://127.0.0.1:31380/pipeline.

编辑:随着需要更新版本的软件包的Elyra v1.5+kfp的可用性,您还可以升级 Elyra 以解决问题。

于 2020-11-16T23:48:32.443 回答