简体   繁体   English

创建版本失败。 检测到错误的 model 错误:“加载模型时出错” - AI Platform Prediction

[英]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

  • Framework/ML runtime version: Tensorflow 1.15.0框架/ML 运行时版本: Tensorflow 1.15.0
  • Python: 3.7.3 Python: 3.7.3

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.

相关问题 加载保存后的预测错误 Keras model - Error at prediction after loading saved Keras model 无法使用自定义容器在 Cloud AI Platform 中创建版本进行预测 - Unable to create a version in Cloud AI Platform using custom containers for prediction Google AI Platform:加载模型时出现意外错误:'str' 对象没有属性 'decode' [Keras 2.3.1, TF 1.15] - Google AI Platform: Unexpected error when loading the model: 'str' object has no attribute 'decode' [Keras 2.3.1, TF 1.15] 创建版本失败。 模型验证失败:输出的外部尺寸必须未知,'Const_1:0'的外部尺寸为5 - Create Version failed. Model validation failed: Outer dimension for outputs must be unknown, outer dimension of 'Const_1:0' is 5 在 Google Cloud 中部署模型:创建版本失败。 模型验证失败:SavedModel 必须包含一个带有标签的元图:服务 - Deploying Model in Google Cloud: Create Version failed. Model validation failed: SavedModel must contain exactly one metagraph with tag: serve 使用Keras模型进行预测时出错 - Error making prediction with Keras model 我有错误“cudaGetDevice() 失败。状态:CNN 初始化错误 Model - I have error "cudaGetDevice() failed. Status: initialization error for CNN Model TensorFlow model 在 Google AI Platform 上使用实例批次进行在线预测太慢 - TensorFlow model serving on Google AI Platform online prediction too slow with instance batches 使用自定义容器进行预测时,如何在统一 AI 平台上访问 Model 端点的工件? - How to access Artifacts for a Model Endpoint on Unified AI Platform when using Custom Containers for Prediction? 将在 Google Cloud AI 平台上训练的 TensorFlow model 保存到 Google Cloud Storage Bucket 时,没有此类 object 错误 - No such object error when saving TensorFlow model trained on Google Cloud AI Platform to a Google Cloud Storage Bucket
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM