transformers package and thus requires two Python packages to run it: Transformers and PyTorch.
We’ll use config.yaml to add the Python packages that the text classification model requires to the model server.
Open config.yaml in a text editor
One of the two essential files in a Truss is config.yaml, which configures the model serving environment. For a complete list of the config options, see the config reference.
Add Python requirements
Python requirements are listed just like they appear in arequirements.txt. ML moves fast; always pin your requirement versions to make sure you’re getting compatible packages.
Update config.yaml with the required packages:
- Code
- Diff
config.yaml
Check for a patch
After you save your changes toconfig.yaml, you should see two things happen:
- Your
truss watchtab should show that a patch was applied to your model server. - The model server logs on your Baseten account should show log entries from the packages being installed in your model server.