GoogleCloudPlatform / data-science-on-gcp

Source code accompanying book: Data Science on the Google Cloud Platform, Valliappa Lakshmanan, O'Reilly 2017
Apache License 2.0
1.31k stars 715 forks source link

Chapter 9: Tensorflow 2.3 may be needed #113

Closed davezen1 closed 2 years ago

davezen1 commented 3 years ago

Had some issues with creating the model from flighs_model_tf2.ipynb. It seems related to Tensorflow/Keras version. I created a new notebook that ran Tensorflow 2.3 and updated --runtime-version flag to used 2.3. I can get the prections for the example json if I run:

gcloud ai-platform predict --model=flights --region=$REGION --version=tf2 --json-instances=example_input.json

on the command line. I can also get the predictions if I used the Test & Use Tab for the version of the Model.

However, in the notebook, no display is shown.