- Model Refreshes

Updating models to ensure their accuracy.

We'll cover the following

Updating models

We’ve deployed sklearn and Keras models to production using Cloud Functions, but the current implementations of these functions use static model files that will not change over time. It’s usually necessary to make changes to models overtime to ensure that the accuracy of the models does not drift too far from expected performance.

Approaches

There are few different approaches that we can take to update the model specification that a Cloud Function is using:

  1. Redeploy: Overwriting the model file on GCS and redeploying the function will result in the function loading the updated file.
  2. Timeout: We can add a timeout to the function, where the model is re-downloaded after a certain threshold of time passes, such as 30 minutes.
  3. New function: We can deploy a new function, such as pred_v2, and update the URL used by the systems calling the service, or use a load balancer to automate this process.
  4. Model trigger: We can add additional triggers to the function to force the function to manually reload the model.

Get hands-on with 1200+ tech skills courses.