Please rotate your device

To continue exploring this website, please rotate your device to a vertical orientation

Changelog

Push models to Baseten using the Truss SDK

Date

Increasingly, we've noticed users interested in deploying models in CI/CD jobs. To make this easier, we now have a way of pushing models to Baseten using a Python SDK.

To use it, simply install Truss normally:

bash
pip install truss --upgrade

Then, in a Python program:

python
import truss

# Push the Truss and deploy
deployment = truss.push("path/to/truss", publish=True)

# Print out deployment attributes
print(deployment.model_id)
print(deployment.model_deployment_id)

This allows you to take programmatic action using the new model_id and model_deployment_id.

See the full reference for more information.