Model deployment

After an endpoint has been created, it needs to be updated with a machine learning model that can serve predictions.

This tutorial demonstrates how to take a model you’ve logged with Verta and deploy it to an Endpoint.

Using the client

Whether the endpoint is already live and serving predictions, or was newly created moments ago, the process for updating it with a new model is the same:

from verta.endpoint.update import DirectUpdateStrategy

endpoint.update(model_version, DirectUpdateStrategy())

The first argument to Endpoint.update() is your RegisteredModelVersion that already has a trained model and its Python environment logged.

The second argument is a strategy to use for the update. Here, you would be using a simple DirectUpdateStrategy that will fully transition the endpoint to use your new model.

You can also update an endpoint with an ExperimentRun:

endpoint.update(run, DirectUpdateStrategy())

Using the CLI

The same action can be done through the CLI. Again, using a model version and a direct update:

verta deployment update endpoint /some-path --run-id "<id>" --strategy direct

Or using an experiment run:

verta deployment update endpoint /some-path --model-version-id "<id>" --strategy direct

Advanced endpoint updates

Certain properties of the endpoint can also be configured during the update, such as compute resources and metric-based autoscaling.

Alternatively, an endpoint can be updated in a more incremental, rule-based manner rather than all at once.