英文:
Got "ERROR:root:Failed to get healthz info attempt 1 of 5." when deploy pipeline in the Kubeflow
问题
我正在尝试按照Kubeflow v2快速入门指南进行操作。
首先,我使用以下命令将Kubeflow部署到本地Kubernetes集群中:
export PIPELINE_VERSION="2.0.0-alpha.4"
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=$PIPELINE_VERSION"
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/env/dev?ref=$PIPELINE_VERSION"
然后,我进行了端口转发操作:
kubectl port-forward service/ml-pipeline-ui --namespace=kubeflow 38620:80
我可以在http://localhost:38620看到UI。
接下来,我安装了kfp
2.0.1,并且这是我的代码:
from kfp import client, dsl
@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:38620" # <- 不确定是否正确,因为在快速入门文档中缺少此部分。
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)
然而,我遇到了错误:
python src/main.py
我在endpoint
中使用的是http://localhost:38620,但是我不确定是否正确,因为在快速入门文档中缺少此部分。
我尝试访问以下地址:
- http://localhost:38620/apis/v2beta1/healthz
- http://localhost:38620/#/apis/v2beta1/healthz
但它们都不存在。
我在https://github.com/kubeflow/kubeflow/issues/5989 上找到了类似的问题,但里面没有有用的信息。
感谢任何指导!
英文:
I am trying to follow the Kubeflow v2 quickstart.
First, I deployed Kubeflow to a local Kubernetes cluster by
export PIPELINE_VERSION="2.0.0-alpha.4"
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=$PIPELINE_VERSION"
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/env/dev?ref=$PIPELINE_VERSION"
I port forwarded by
kubectl port-forward service/ml-pipeline-ui --namespace=kubeflow 38620:80
I can see the UI at http://localhost:38620
Next, I installed kfp
2.0.1. And here is my code:
from kfp import client, dsl
@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:38620" # <- Not entirely sure if it is correct as it is missing in the quickstart document.
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)
However, I got error
python src/main.py
/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp/client/client.py:158: FutureWarning: This client only works with Kubeflow Pipeline v2.0.0-beta.2 and later versions.
warnings.warn(
ERROR:root:Failed to get healthz info attempt 1 of 5.
Traceback (most recent call last):
File "/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp/client/client.py", line 435, in get_kfp_healthz
return self._healthz_api.get_healthz()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp_server_api/api/healthz_service_api.py", line 63, in get_healthz
return self.get_healthz_with_http_info(**kwargs) # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp_server_api/api/healthz_service_api.py", line 134, in get_healthz_with_http_info
return self.api_client.call_api(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp_server_api/api_client.py", line 364, in call_api
return self.__call_api(resource_path, method,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp_server_api/api_client.py", line 188, in __call_api
raise e
File "/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp_server_api/api_client.py", line 181, in __call_api
response_data = self.request(
^^^^^^^^^^^^^
File "/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp_server_api/api_client.py", line 389, in request
return self.rest_client.GET(url,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp_server_api/rest.py", line 230, in GET
return self.request("GET", url,
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp_server_api/rest.py", line 224, in request
raise ApiException(http_resp=r)
kfp_server_api.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'X-Powered-By': 'Express', 'Content-Security-Policy': "default-src 'none'", 'X-Content-Type-Options': 'nosniff', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '159', 'Date': 'Mon, 03 Jul 2023 03:59:33 GMT', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=5'})
HTTP response body: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /apis/v2beta1/healthz</pre>
</body>
</html>
Inside for endpoint
, I am using http://localhost:38620, However, I am not entirely sure if I am using correct one as it is missing in quickstart document.
I tried to access
- http://localhost:38620/apis/v2beta1/healthz
- http://localhost:38620/#/apis/v2beta1/healthz
and they do not exist.
I found a similar issue at https://github.com/kubeflow/kubeflow/issues/5989 but there is not any helpful info inside.
Any guide would be appreciate!
答案1
得分: 1
UPDATE: 我已经提交了一个拉取请求来更新文档。今天应该很好。
我仔细查看了Python脚本日志。它有一行:
> 未来警告:此客户端仅与Kubeflow Pipeline v2.0.0-beta.2及更高版本兼容。
原来Kubeflow v2快速入门已过时。
在我将2.0.0-alpha.4
替换为2.0.0
之后(您可以在https://github.com/kubeflow/pipelines/releases?q=Version找到最新版本),然后重新部署:
export PIPELINE_VERSION="2.0.0"
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=$PIPELINE_VERSION"
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/env/dev?ref=$PIPELINE_VERSION"
现在流水线脚本成功执行:
python src/main.py
/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp/client/client.py:158: 未来警告:此客户端仅与Kubeflow Pipeline v2.0.0-beta.2及更高版本兼容。
警告(
实验详情:http://localhost:38620/#/experiments/details/c9d82bc3-712e-422a-804f-fcbe5d2b8acb
运行详情:http://localhost:38620/#/runs/details/87398dae-6488-446b-b650-7bbc580aab56
http://localhost:38620/#/runs/details/87398dae-6488-446b-b650-7bbc580aab56
健康端点http://localhost:38620/apis/v2beta1/healthz也返回:
{
"buildDate": "Tue Jun 20 16:56:00 UTC 2023",
"frontendCommitHash": "e03e31219387b587b700ba3e31a02df486aa364f",
"frontendTagName": "2.0.0",
"apiServerReady": true,
"apiServerCommitHash": "e03e31219387b587b700ba3e31a02df486aa364f",
"apiServerTagName": "2.0.0",
"apiServerMultiUser": false,
"multi_user": false
}
英文:
UPDATE: I have opened a pull request to update the document. Today should be good.
I had a closer look of the Python script log. It has a line:
> FutureWarning: This client only works with Kubeflow Pipeline v2.0.0-beta.2 and later versions.
It turns out the Kubeflow v2 quickstart is out-of-date.
After I replaced 2.0.0-alpha.4
to 2.0.0
(You can find latest version at https://github.com/kubeflow/pipelines/releases?q=Version) and redeploy by
export PIPELINE_VERSION="2.0.0"
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=$PIPELINE_VERSION"
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/env/dev?ref=$PIPELINE_VERSION"
Now the pipeline script succeed:
python src/main.py
/Users/hongbo-miao/Library/Caches/pypoetry/virtualenvs/hm-kubeflow-calculate-PriecqfA-py3.11/lib/python3.11/site-packages/kfp/client/client.py:158: FutureWarning: This client only works with Kubeflow Pipeline v2.0.0-beta.2 and later versions.
warnings.warn(
Experiment details: http://localhost:38620/#/experiments/details/c9d82bc3-712e-422a-804f-fcbe5d2b8acb
Run details: http://localhost:38620/#/runs/details/87398dae-6488-446b-b650-7bbc580aab56
http://localhost:38620/#/runs/details/87398dae-6488-446b-b650-7bbc580aab56
The health endpoint http://localhost:38620/apis/v2beta1/healthz also returns
{
"buildDate": "Tue Jun 20 16:56:00 UTC 2023",
"frontendCommitHash": "e03e31219387b587b700ba3e31a02df486aa364f",
"frontendTagName": "2.0.0",
"apiServerReady": true,
"apiServerCommitHash": "e03e31219387b587b700ba3e31a02df486aa364f",
"apiServerTagName": "2.0.0",
"apiServerMultiUser": false,
"multi_user": false
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论