Push models to Baseten using the Truss SDK

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:

pip install truss --upgrade

Then, in a Python program:

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.