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.
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())
Endpoints may also be updated to use a build which has been previously made and deployed.
existing_endpoint = client.get_or_create_endpoint(path="/existing-model")
build = existing_endpoint.get_current_build()
new_endpoint = client.get_or_create_endpoint(path="/reused-model")
new_endpoint.update(build)
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.
Last modified 8mo ago