Truss 0.2.0: Improved developer experience
Truss is an open-source library for packaging and serving machine learning models. In the latest minor version release, 0.2.0, we simplified the names of several core functions in Truss to create a cleaner interface. Here's an example of the new developer experience:
Interface changes:
In the Python client,
truss.create()
replacestruss.mk_truss()
.In the Python client,
truss.load()
replacestruss.from_directory()
.In the Truss handle,
truss.predict()
offers a shorter alternative totruss.server_predict()
. To use in place oftruss.docker_predict()
, pass the optional kwarguse_docker=True
.In the command-line interface, the behavior of truss predict has been updated to match the Python client. Previously,
truss predict
ran on Docker by default, which could be overriden withRUN_LOCAL=true
. Now,truss predict
runs without Docker by default, which can be overriden withUSE_DOCKER=true
.
These interface changes are intended to improve Truss' developer experience, not cause unnecessary trouble. As such, the old mk_truss()
and from_directory()
functions, while marked with a deprecation warning, will not be removed until the next major version update. And both server_predict()
and docker_predict()
will be supported in the Truss handle indefinitely.
For a complete list of Truss changes version-to-version, consult the Truss release notes.