Chapter 19 - KeyError in GCP Prediction Service Model Version Mismatch
Open
- Dominant language
- Jupyter Notebook
- Stars
- 30k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
If you deploy Model v2 to GCP (as per page 680 .../my_mnist_model/0002/) then parsing of the prediction results fails due to a Key Error, eg:
KeyError: 'dense_2'
This occurs because the output_name is still assigned to the value from v1, eg 'dense_1'. Resetting the output_name to the v2 value prior to calling Predict allows the results to be parsed correctly
output_name = model.output_names[0]
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.