Giter VIP home page Giter VIP logo

mrdbourke / cs329s-ml-deployment-tutorial Goto Github PK

View Code? Open in Web Editor NEW
582.0 9.0 174.0 68.73 MB

Code and files to go along with CS329s machine learning model deployment tutorial.

Home Page: https://youtu.be/fw6NMQrYc6w

License: MIT License

Dockerfile 0.15% Makefile 0.10% Python 4.64% Jupyter Notebook 95.11%
google-cloud machine-learning food-vision deployment-tutorial cloud-services tensorflow machine-learning-deployment machine-learning-tutorial

cs329s-ml-deployment-tutorial's Issues

Error in # Save model_1 model_1.save("efficientnet_model_1_10_classes")

KeyError: "Failed to add concrete function 'b'__inference_model_1_layer_call_fn_61750'' to object-based SavedModel as it captures tensor <tf.Tensor: shape=(), dtype=resource, value=> which is unsupported or not reachable from root. One reason could be that a stateful object or a variable that the function depends on is not assigned to an attribute of the serialized trackable object (see SaveTest.test_captures_unreachable_variable)."

Error when executing request during prediction

HttpError: <HttpError 400 when requesting https://us-central1-ml.googleapis.com/v1/projects/food-345502/models/food_model1_test:predict?alt=json returned "{ "error": "Failed to process element: 0 of 'instances' list. Error: UNIMPLEMENTED: Conversion of JSON Value: 153 to type: half" }". Details: "{ "error": "Failed to process element: 0 of 'instances' list. Error: UNIMPLEMENTED: Conversion of JSON Value: 153 to type: half" }">
Traceback:

403 api enabled but error

Hitting this error on a local instance trying to predict:

HttpError: <HttpError 403 when requesting https://us-west1-ml.googleapis.com/v1/projects/foodml/models/foodml_1:predict?alt=json returned "AI Platform Training & Prediction API has not been used in project 37288436933 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/ml.googleapis.com/overview?project=37288436933 then retry.

The API is enabled but the project number seems incorrect in the above message.

The region us-central1 does not have enough resources available to fulfill the request.

When I do this step:

3. Deploying the whole app to GCP
Okay, I've fixed the permissions error, how do I deploy my model/app?

I'm glad you asked...

run make gcloud-deploy... wait 5-10 mins and your app will be on App Engine (as long as you've activated the App Engine API)
...and you're done

I get this error in my Git Bash terminal:

ERROR: (gcloud.app.deploy) Error Response: [9] An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2022-11-25T13:25:59.323Z7873.jc.1: The region us-central1 does not have enough resources available to fulfill the request. Please try again later.
make: *** [Makefile:13: gcloud-deploy] Error 1

I did 'try again later' only to get the same error response.

What could I try?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.