class Model:
    def __init__(self, **kwargs):
        self._model = None

    def load(self):
        pass

    def predict(self, model_input):
        return model_input

You don’t have to run truss push every time you update your Truss during development. Instead, you can have a live reload workflow where local changes automatically are pushed to the production environment to give you a lightning-fast feedback loop.

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.

In a new terminal tab in the same my-first-truss working directory, run:

truss watch

Now, as you update your Truss, the changes will be patched onto the model server on the remote host.

Use truss watch while working

In the next three steps, we’ll deploy a basic ML model to our model server. Check your truss watch tab and model logs on Baseten after each step to see the changes you make locally reflected live on your model server.

Leave truss watch running in this new terminal tab for the rest of the tutorial. You can use Control-C to exit truss watch and stop automatically pushing changes.