GCP AI平台自定义预测例程无法通过管道加载模型,错误为:92

时间:2020-02-20 15:56:13

标签: python google-cloud-platform joblib gcp-ai-platform-training

我目前正在尝试使用https://cloud.google.com/ai-platform/prediction/docs/custom-prediction-routine-scikit-learn作为指导将模型部署到GCP AI平台。运行gcloud beta ai platform versions create时,出现以下错误,截至2020年2月20日,没有点击率:

Creating version (this might take a few minutes)......failed.
ERROR: (gcloud.beta.ai-platform.versions.create) Create Version failed. Bad model detected with 
error:  "Failed to load model: Unexpected error when loading the model: 92 (Error code: 0)"

我的模型是一个Sci-kit学习多项式朴素贝叶斯分类器,它在管道中使用两个tf / idf矢量化器(单词和字符级)。我使用joblib版本0.13.0存储整个管道,该版本与GCP支持的版本匹配(链接:https://cloud.google.com/ai-platform/prediction/docs/runtime-version-list)。

在学习完本教程之后,我对tar.gz进行了处理,将模型和腌制过的预处理器存储在存储桶中。遵循其他建议,我也将预处理器与joblib存储在一起,可悲的是它也无法正常工作。

我已经joblib.load对模型进行了很好的调整,并在0.13.0中进行了预测,所以我要拔头发了。

更新:我已经多次检查和重做酸洗/作业库,甚至还设置了新的virtualenv以匹配1.15并从头开始重做培训。

我已将模型暴露在Flask应用程序后面,然后将其部署到应用程序引擎,虽然运行正常,但对于两个模型来说可能有点过大。效果很好。

0 个答案:

没有答案