tensorflow - 来自标准 JSON 文件的 gcloud ai 平台预测错误:gcloud 崩溃(AttributeError):“NoneType”对象没有属性“框架”
问题描述
我正在尝试对 JSON 文件运行 ML 预测请求records.json
。
!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实验室“使用 Tensorflow 和 AI 平台预测房价”。tensorflow
所有命令都在使用框架的 GCP 上的 Jupyter 笔记本中。我错过了一些东西。任何帮助表示赞赏。
解决方案
我设法解决了这个问题。:) 感谢@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]
推荐阅读
- reactjs - 赛普拉斯测试:卡在等待 http://localhost:3000
- sql - 内联表值函数不起作用
- sql-server - 读取表的 50%,不包括最后一行
- sql - 如何使用 SQL 从日期列中提取会计月份编号而不使用 case 语句
- javascript - 按下按钮后从数组中删除/更新项目的最佳方法是什么?
- svelte - 如何在按钮单击时添加另一个组件
- mysql - 需要获取两个值的最新记录,然后使用它来获取最旧的 -MySQL 5.7
- android - 尝试使用android创建房间数据库,但不断出现依赖错误
- c - C rand() 略有偏差
- python - 谁从 cookie jar 中获取了 python 请求 shib_idp_session cookie?