[英]Create Version Failed. Bad model detected with error: "Error loading the model" - AI Platform Prediction
I created a model through AI Platform
UI that uses a global endpoint.我通过使用全局端点的AI Platform
UI 创建了 model。 I am trying to deploy a basic tensorflow 1.15.0 model I exported using the Saved Model builder.我正在尝试部署使用 Saved Model 构建器导出的基本 tensorflow 1.15.0 model。 When I try to deploy this model I get a Create Version Failed. Bad model detected with error: "Error loading the model"
当我尝试部署此 model 时,我得到一个Create Version Failed. Bad model detected with error: "Error loading the model"
Create Version Failed. Bad model detected with error: "Error loading the model"
error in the UI and the I see the following in the logs: Create Version Failed. Bad model detected with error: "Error loading the model"
错误,并且我在日志中看到以下内容:
ERROR:root:Failed to import GA GRPC module. This is OK if the runtime version is 1.x
Failure: Could not reach metadata service: Internal Server Error.
ERROR:root:Command '['/tools/google-cloud-sdk/bin/gsutil', '-o', 'GoogleCompute:service_account=default', 'cp', '-R', 'gs://cml-365057443918-1608667078774578/models/xsqr_global/v6/7349456410861999293/model/*', '/tmp/model/0001']' returned non-zero exit status 1.
ERROR:root:Error loading model: 'generator' object has no attribute 'next'
ERROR:root:Error loading the model
What is strange is that the gcloud ai-platform local predict
works correctly with this exported model, and I can deploy this exact same model on a regional endpoint with no issues.奇怪的是gcloud ai-platform local predict
与这个导出的 model 一起正常工作,我可以在区域端点上部署这个完全相同的 model 而没有问题。 It only gives this error if I try to use a global endpoint model.如果我尝试使用全局端点 model,它只会给出此错误。 But I need the global endpoint because I plan on using a custom prediction routine (if I can get this basic model working first).但我需要全局端点,因为我计划使用自定义预测例程(如果我能让这个基本的 model 首先工作)。
The logs seem to suggest an issue with copying the model from storage?日志似乎表明从存储中复制 model 存在问题? I've tried giving various IAM roles additional viewer permissions, but I still get the same errors.我尝试为各种 IAM 角色提供额外的查看者权限,但我仍然遇到相同的错误。
Thanks for the help.谢谢您的帮助。
I think it's the same issue as https://issuetracker.google.com/issues/175316320我认为这与https://issuetracker.google.com/issues/175316320相同的问题
The comment in the issue says the fix is now rolling out.问题中的评论说修复程序现在正在推出。
Today I faced the same error (ERROR: (gcloud.ai-platform.versions.create) Create Version failed. Bad model detected with error: "Error loading the model") & for those who wants a summary:今天我遇到了同样的错误(错误:(gcloud.ai-platform.versions.create)创建版本失败。Bad model 检测到错误:“加载模型时出错”)&对于那些想要总结的人:
The recommendation is to use n1* machine types (for example: n1-standard-4) via regional endpoints (for example: us-central1) instead of mls1* machines while deploying version.建议在部署版本时通过区域端点(例如:us-central1)使用 n1* 机器类型(例如:n1-standard-4)而不是 mls1* 机器。 Also I made sure to mention the same region (us-central1) while creating the model itself using the below command, thereby resolving the above mentioned error.此外,在使用以下命令创建 model 本身时,我确保提到了相同的区域 (us-central1),从而解决了上述错误。
!gcloud ai-platform models create $model_name !gcloud 人工智能平台模型创建 $model_name
--region=$REGION --region=$地区
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.