1

I am trying to run an ML prediction request on a JSON file records.json.

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

I am getting the following error.

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

All libraries are imported.

import pandas as pd
import tensorflow as tf

I am following a qwiklabs lab 'Predict Housing Prices with Tensorflow and AI Platform'. All commands are in Jupyter notebook on GCP using tensorflow framework. I am missing something. Any help is appreciated.

jningthou
  • 852
  • 7
  • 10

1 Answers1

0

I managed to resolve the issue. :) Thanks @john-hanley for pointing me to check what I might have missed.

Resolution:

  • ssh into the VM (although managed by GCP) I updated the gcloud components
  • $ gcloud components update
  • My prediction command !gcloud ai-platform predict --model housing_prices --json-instances records.json
  • Threw the output as expected.
Using endpoint [https://ml.googleapis.com/]
PREDICTIONS
[24958.638671875]
[19435.654296875]
jningthou
  • 852
  • 7
  • 10
  • Just to close on this one. SDK gets released every week. DLVMs (Notebooks OS) every 2 weeks. I would be interested in knowing which Notebook DLVM image and version you were using. As if the bug you pointed out was solved in a more recent release of SDK it would not be included in latest DLVM build based on what I stated above. – gogasca Feb 08 '21 at 05:29
  • GCP AI Platform Notebooks - DLVM instance was TensorFlow Enterprise 1.15 (pre-installed with support for Keras), Without GPUs @gogasca, Thanks for following up. – jningthou Feb 09 '21 at 10:07