简体   繁体   English

使用ML Engine预测GCP

[英]Prediction on GCP with ML Engine

I am working on GCP to predict, I'm using the census dataset, actually I'm discovering google APIs ( ML Engine ...). 我正在使用GCP进行预测,因此我正在使用人口普查数据集,实际上是在发现Google API(ML Engine ...)。

When I launch the prediction job , the job runs successfully, but it doesn't display the result. 当我启动预测作业时,该作业成功运行,但是不显示结果。

Can anyone help ? 有人可以帮忙吗? Do you have any idea why it doesn't generate an output ? 您知道为什么它不生成输出吗?

Thanks in advance :) 提前致谢 :)

This is the error that occurs 这是发生的错误

https://i.stack.imgur.com/9gyTb.png https://i.stack.imgur.com/9gyTb.png

This error is common when you train with one version of TF and then try serving with a lower version. 当您使用一个版本的TF进行训练然后尝试使用较低版本的TF时,此错误很常见。 For instance, if you are using Cloud console to deploy your model, it currently has no way of letting you select the version of TensorFlow for serving, so the model is deployed using TF 1.0, but your model may have been trained with a higher version of TF (current version is 1.7). 例如,如果您正在使用Cloud console部署模型,则当前无法让您选择TensorFlow的版本进行服务,因此该模型是使用TF 1.0部署的,但是您的模型可能已经过更高版本的培训TF(当前版本为1.7)。

Although the Cloud console doesn't currently let you select the version (but it will soon!), using gcloud or the REST API directly does allow you to. 尽管Cloud控制台当前不允许您选择版本(但很快就会选择!),但是直接使用gcloud或REST API确实可以。

In the docs , there is a section on creating a model that has code snippets under "gcloud" and "python". docs中 ,有一节介绍如何创建一个在“ gcloud”和“ python”下具有代码段的模型。 With gcloud you simply add the argument --runtime-version=1.6 (or whatever version) and with python you add the property "runtimeVersion": "1.6" to the body of the request. 使用gcloud,您只需添加参数--runtime-version=1.6 (或任何版本),而使用python,则将属性“ runtimeVersion”:“ 1.6”添加到请求的正文中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM