【问题标题】:gcloud ai-platform prediction from standard JSON file ERROR: gcloud crashed (AttributeError): 'NoneType' object has no attribute 'framework'来自标准 JSON 文件的 gcloud ai 平台预测错误:gcloud 崩溃(AttributeError):“NoneType”对象没有属性“框架”
【发布时间】:2021-02-07 05:55:15
【问题描述】:

我正在尝试对 JSON 文件 records.json 运行 ML 预测请求。

!gcloud ai-platform predict --model housing_prices --json-instances records.json

我收到以下错误。

Using endpoint [https://ml.googleapis.com/]
ERROR: gcloud crashed (AttributeError): 'NoneType' object has no attribute 'framework'

所有库都已导入。

import pandas as pd
import tensorflow as tf

我正在关注 qwiklabs lab“使用 Tensorflow 和 AI 平台预测房价”。所有命令都在 GCP 上的 Jupyter 笔记本中,使用 tensorflow 框架。我错过了一些东西。任何帮助表示赞赏。

【问题讨论】:

  • 什么版本的 CLI:gcloud --version?
  • 谢谢约翰,我确实检查了版本。这是最新的326.0。 0. - 笔记本在 Google 管理的最新 CLI 上运行

标签: tensorflow google-cloud-platform gcloud gcp-ai-platform-notebook


【解决方案1】:

我设法解决这个问题。 :) 感谢@john-hanley 指点我检查我可能错过的内容。

分辨率:

  • ssh 进入虚拟机(虽然由 GCP 管理)我更新了 gcloud 组件
  • $ gcloud components update
  • 我的预测命令!gcloud ai-platform predict --model housing_prices --json-instances records.json
  • 按预期抛出输出。
Using endpoint [https://ml.googleapis.com/]
PREDICTIONS
[24958.638671875]
[19435.654296875]

【讨论】:

  • 只是关闭这个。 SDK 每周发布一次。 DLVM(笔记本操作系统)每 2 周。我很想知道您使用的是哪个笔记本 DLVM 映像和版本。好像您指出的错误已在更新的 SDK 版本中解决,根据我上面所述,它不会包含在最新的 DLVM 构建中。
  • GCP AI Platform Notebooks - DLVM 实例是 TensorFlow Enterprise 1.15(预装支持 Keras),没有 GPU @gogasca,感谢您的跟进。
猜你喜欢
  • 2019-11-23
  • 1970-01-01
  • 2020-08-24
  • 1970-01-01
  • 2021-07-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-08-26
相关资源
最近更新 更多