问题描述
问题
我想弄清楚运行以下代码的最低权限是什么:
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 错误的更多信息吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)