Links

Model versions

Update and manage your models with semantic versioning.

Deploying model versions

To add a new version of an existing model, simply call baseten.deploy() passing it the new model object and the same model_name as the existing model.
baseten.deploy(
my_updated_model,
model_name="My wonderful model" # model_name MUST stay the same between versions of the same model
)
Versions auto-increment by minor version, starting at 0.1.0. When updating a model, use the optional argument version_bump='MAJOR' (or 'MINOR' or 'PATCH') to override this default.
baseten.deploy(
my_updated_model,
model_name="My wonderful model", # model_name MUST stay the same between versions of the same model
version_bump="MAJOR"
)
And if you want to skip the draft model stage, pass publish=True into baseten.deploy() and your new version will be deployed and published with production resources.
baseten.deploy(
my_updated_model,
model_name="My wonderful model", # model_name MUST stay the same between versions of the same model
publish=True
)

Managing model versions

You can manage your deployed models via model versions. Every deployment of a model with the same model_name parameter as an existing model creates a new version of that model, not a new model. Each version has a version ID, a unique string used to identify the model in the Python client and API.
​
Navigate through model versions using the left sidebar
​
Models are versioned with semantic versioning to track changes over time. Versions auto-increment by minor version, starting with 0.1.0. When deploying a model, use the optional argument version_bump='MAJOR' (or 'MINOR' or 'PATCH') to override this default.

Primary

The primary version of a model will be used by default for all invocations unless you specify the desired version when calling the model. This model version is, by default, the most recent published deployment of a model. You can make any active version the primary version by clicking the three-dot dropdown menu to the right of its version number in the left sidebar, then selecting "Promote to primary."

Deactivate and delete

A version of a model can be deactivated or deleted. The difference is that inactive model versions can be reactivated at any time, while deleted model versions are gone forever. Neither inactive nor deleted model versions are counted for billing purposes.
​
Deactivate and delete model version from the menu
​
To deactivate a model version, click on the three-dot menu to the right of its version number in the left sidebar. From the options present, select "Deactivate version." Note that deactivation happens immediately and re-activating a model takes several minutes as the model serving environment starts up; be certain that the model version is not in use before deactivating it.
To delete a model version, click on the same three-dot menu to the right of its version number in the left sidebar. From the options present, select "Delete version." Deletion happens immediately and is irreversible; be absolutely sure that the model version is no longer needed before deleting it.
A model does not need any active versions, but if you delete the only version of a model, the model as a whole is deleted as well.