gcloud ai api返回“不良请求”
我已登录( gcloud auth登录
),但是除此之外,我没有详细信息为什么此命令不起作用。代码:
from google.cloud import aiplatform
job = aiplatform.PipelineJob(display_name="MY_DISPLAY_JOB", template_path=/tmp/tmpt727de81, project=project_id, pipeline_root=project_gcp_bucket)
job.submit()
错误:
Creating PipelineJob
Traceback (most recent call last):
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
return callable_(*args, **kwargs)
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/grpc/_channel.py", line 946, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Getting metadata from plugin failed with error: ('invalid_grant: Bad Request', {'error': 'invalid_grant', 'error_description': 'Bad Request'})"
debug_error_string = "{"created":"@1650655555.692528693","description":"Error received from peer us-central1-aiplatform.googleapis.com:443","file":"src/core/lib/surface/call.cc","file_line":905,"grpc_message":"Getting metadata from plugin failed with error: ('invalid_grant: Bad Request', {'error': 'invalid_grant', 'error_description': 'Bad Request'})","grpc_status":14}"
>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/daaronch/code/same-project/sameproject/ops/vertex/vertex_debugger.py", line 108, in <module>
main(auto_envvar_prefix="SAME")
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/daaronch/code/same-project/sameproject/ops/vertex/vertex_debugger.py", line 99, in deploy_vertex
job.submit()
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/google/cloud/aiplatform/pipeline_jobs.py", line 304, in submit
self._gca_resource = self.api_client.create_pipeline_job(
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/google/cloud/aiplatform_v1/services/pipeline_service/client.py", line 1281, in create_pipeline_job
response = rpc(
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py", line 154, in __call__
return wrapped_func(*args, **kwargs)
File "/tmp/tmpt727de81/.venv/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.ServiceUnavailable: 503 Getting metadata from plugin failed with error: ('invalid_grant: Bad Request', {'error': 'invalid_grant', 'error_description': 'Bad Request'})
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够重新创建管道。
我使用了sascha的(感谢Sascha!)生成(NY)
pipeline.json
:pipeline.py
:运行上面生成
component.yaml
和my-pipeline.json
。第二步需要后者,该步骤反映了您的问题中的代码:main.py.py
:运行此收益率:
我不确定是否有
gcloud
命令枚举PipeLines但是我验证了它是在控制台中创建的。I'm able to repro creating a pipeline.
I used Sascha's example (Thanks Sascha!) to generate a(ny)
pipeline.json
:pipeline.py
:Running the above generates
component.yaml
andmy-pipeline.json
. The latter is needed for the second step which mirrors the code in your question:main.py
:Running this yields:
I'm unsure whether there's a
gcloud
command that enumerates pipelines but I verified that it was created in the Console.