#google-cloud-ai-platform-pipelines
#google-cloud-ai-platform-конвейеры
Вопрос:
Проблема
Я пытаюсь выяснить, каковы минимальные разрешения для запуска следующего кода:
pipeline = Pipeline(...)
client = kfp.Client(host=...)
client.create_run_from_pipeline_func(
pipeline.build(),
experiment_name=...,
run_name=...,
arguments={...},
)
Прямо сейчас я получаю эту ошибку:
Traceback (most recent call last):
File "main.py", line 122, in <module>
Fire()
File "/usr/local/lib/python3.7/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/usr/local/lib/python3.7/site-packages/fire/core.py", line 468, in _Fire
target=component.__name__)
File "/usr/local/lib/python3.7/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "main.py", line 32, in run
arguments={...},
File "/usr/local/lib/python3.7/site-packages/kfp/_client.py", line 566, in create_run_from_pipeline_func
return self.create_run_from_pipeline_package(pipeline_package_path, arguments, run_name, experiment_name, namespace)
File "/usr/local/lib/python3.7/site-packages/kfp/_client.py", line 606, in create_run_from_pipeline_package
experiment = self.create_experiment(name=experiment_name, namespace=namespace)
File "/usr/local/lib/python3.7/site-packages/kfp/_client.py", line 307, in create_experiment
experiment = self._experiment_api.create_experiment(body=experiment)
File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api/experiment_service_api.py", line 201, in create_experiment
return self.create_experiment_with_http_info(body, **kwargs) # noqa: E501
File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api/experiment_service_api.py", line 299, in create_experiment_with_http_info
collection_formats=collection_formats)
File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api_client.py", line 383, in call_api
_preload_content, _request_timeout, _host)
File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api_client.py", line 202, in __call_api
raise e
File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api_client.py", line 199, in __call_api
_request_timeout=_request_timeout)
File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api_client.py", line 427, in request
body=body)
File "/usr/local/lib/python3.7/site-packages/kfp_server_api/rest.py", line 285, in POST
body=body)
File "/usr/local/lib/python3.7/site-packages/kfp_server_api/rest.py", line 238, in request
raise ApiException(http_resp=r)
kfp_server_api.exceptions.ApiException: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Content-Length': '1452', 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Thu, 28 Jan 2021 22:00:00 GMT', 'Vary': 'Origin', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'SAMEORIGIN', 'X-Xss-Protection': '0', 'Set-Cookie': 'S=cloud_datalab_tunnel=IlqqPSpNPYnCEXgK8tKJWIU8pWOUhO8xcOC9JxvQPmc; Path=/; Max-Age=3600'})
HTTP response body:
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 401 (Unauthorized)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>401.</b> <ins>That’s an error.</ins>
<p> <ins>That’s all we know.</ins>
Настройка среды
Примечания:
- Я запускаю как
create_run_from_pipeline_func
код, так и экземпляр kubeflow внутри кластера. - Если я даю
prediction-kubeflow
Owner
роль, все работает
Вопросы:
- Какие минимальные разрешения мне нужно предоставить учетной записи службы, чтобы это заработало?
- Как я должен это отлаживать? Есть ли где-нибудь, где я могу найти дополнительную информацию об этой ошибке 401?
Комментарии:
1. Вы нашли решение?