GoogleCloudPlatform / ai-platform-text-classifier-shap

Text classification demo from our Next '19 breakout session
https://sararobinson.dev/2019/04/23/interpret-bag-of-words-models-shap.html
Apache License 2.0
80 stars 62 forks source link

Unable to deploy model on AI platform #4

Closed RanjitMane7 closed 3 years ago

RanjitMane7 commented 3 years ago

Hi @sararob,

I'm using tensorflow==1.13.1 When I try to create the model using exact steps as you in colab notebook, I'm getting the error:

ERROR: (gcloud.beta.ai-platform.versions.create) FAILED_PRECONDITION: Field: prediction_class Error: Exactly one of "prediction_class" and "framework" may be provided. In order to use a custom prediction class, "framework" should be left unspecified.

As the above ERROR suggests: In order to use a custom prediction class, "framework" should be left unspecified. I've removed the field: --framework='TENSORFLOW' \

but now I'm getting the below error:

ERROR: (gcloud.beta.ai-platform.versions.create) Create Version failed. Bad model detected with error: "Failed to load model: User-provided package so_predict-0.1.tar.gz failed to install: Command '['python-default', '-m', 'pip', 'install', '--target=/tmp/custom_lib', '--no-cache-dir', '-b', '/tmp/pip_builds', '/tmp/custom_code/so_predict-0.1.tar.gz']' returned non-zero exit status 1 (Error code: 0)"

Also, I tried using the same model locally and it's working fine. Really appreciate your help.

RanjitMane7 commented 3 years ago

Sorry to bother you, there was a typo in setup.py!