
Truss' live reload model serving workflow
Create a Truss
truss init
creates those files in a target directory.
To package a model with Truss, follow the quickstart, a step-by-step example, or an example from GitHub.
See the CLI reference for more information on truss init.
Spin up model server
truss push
to spin up a model server with your model and config.
See the CLI reference for more information on truss init.
Test the model
truss predict
.
See the CLI reference for more information on truss predict.
Watch for changes
Run the
truss watch
command in a new terminal tab in the same working directory, as you’ll need to leave it running while you work.truss watch
running, it will automatically attempt to patch that change onto the model server. Most changes to model.py
and config.yaml
can be patched.
The following changes should not be made in a live reload workflow:
- Updates to
resources
inconfig.yaml
, which must be set before the firsttruss push
- Changes to the
model_name
inconfig.yaml
. Changing the model name requires a newtruss push
to create a new model server.
Publish your model
Once you’re happy with your model, stoptruss watch
and run: