Skip to content

Commit 73ed2aa

Browse files
version 0.2.0 ready for release (#177)
1 parent a3afc9b commit 73ed2aa

8 files changed

+31
-8
lines changed

docs/CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
Release notes for new versions of Truss, in reverse chronological order.
44

5+
### Version 0.2.0
6+
7+
With this release, a minor version increment recognizes the overall progress made on Truss since its initial release in Summer 2022. And simplified naming for key functions improves Truss' developer experience, while carefully considered warnings and a long deprecation period ensure nothing breaks.
8+
9+
#### Interface changes
10+
11+
* In the Python client, `truss.create()` replaces `truss.mk_truss()`.
12+
* In the Python client, `truss.load()` replaces `truss.from_directory()`.
13+
* In the Truss handle, `truss.predict()` offers a shorter alternative to `truss.server_predict()`. To use in place of `truss.docker_predict()`, pass the optional kwarg `use_docker=True`.
14+
* In the command-line interface, the behavior of `truss predict` has been updated to match the Python client.
15+
* Previously, `truss predict` ran on Docker by default, which could be overriden with `RUN_LOCAL=true`.
16+
* Now, `truss predict` runs without Docker by default, which can be overriden with `USE_DOCKER=true`.
17+
18+
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.
19+
520
### Version 0.1.5
621

722
This release adds the `live_reload` option. This feature makes it faster to run a Truss in Docker in some situations, letting you develop your Truss without waiting for Docker to rebuild between changes.

docs/create/huggingface.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Check the target directory to see your new Truss!
4444
To get a prediction from the Truss, try running:
4545

4646
```python
47-
tr.docker_predict({"inputs": ["Donatello is a teenage mutant [MASK] turtle"]})
47+
tr.predict({"inputs": ["Donatello is a teenage mutant [MASK] turtle"]})
4848
```
4949

5050
For more on running the Truss locally, see [local development](../develop/localhost.md).

docs/create/lightgbm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Check the target directory to see your new Truss!
6666
To get a prediction from the Truss, try running:
6767

6868
```python
69-
tr.docker_predict({"inputs": [[0, 0, 0, 0, 0, 0]]})
69+
tr.predict({"inputs": [[0, 0, 0, 0, 0, 0]]})
7070
```
7171

7272
For more on running the Truss locally, see [local development](../develop/localhost.md).

docs/create/sklearn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Check the target directory to see your new Truss!
4545
To get a prediction from the Truss, try running:
4646

4747
```python
48-
tr.docker_predict({"inputs": [[0, 0, 0, 0]]})
48+
tr.predict({"inputs": [[0, 0, 0, 0]]})
4949
```
5050

5151
For more on running the Truss locally, see [local development](../develop/localhost.md).

docs/create/xgboost.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Check the target directory to see your new Truss!
6161
To get a prediction from the Truss, try running:
6262

6363
```python
64-
tr.docker_predict({"inputs": [[0, 0, 0, 0, 0, 0]]})
64+
tr.predict({"inputs": [[0, 0, 0, 0, 0, 0]]})
6565
```
6666

6767
For more on running the Truss locally, see [local development](../develop/localhost.md).

docs/develop/localhost.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ tr = truss.load("path_to_my_truss")
2727
From there, you can invoke the Truss to serve the model in your Python environment. Just run:
2828

2929
```python
30-
tr.docker_predict({"inputs": [[0, 0, 0, 0]]})
30+
tr.predict({"inputs": [[0, 0, 0, 0]]})
3131
```
3232

3333
### Command line interface

docs/notebooks/huggingface_example.ipynb

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"cells": [
33
{
4+
"attachments": {},
45
"cell_type": "markdown",
56
"metadata": {
67
"id": "ndlSFJb7wCAU"
78
},
89
"source": [
9-
"# Truss TensorFlow example\n",
10+
"# Truss HuggingFace example\n",
1011
"\n",
1112
"<a href=\"https://colab.research.google.com/github/basetenlabs/truss/blob/main/docs/notebooks/sklearn_example.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
1213
]
@@ -69,10 +70,17 @@
6970
},
7071
"kernelspec": {
7172
"display_name": "Python 3",
73+
"language": "python",
7274
"name": "python3"
7375
},
7476
"language_info": {
75-
"name": "python"
77+
"name": "python",
78+
"version": "3.8.9 (default, Apr 13 2022, 08:48:06) \n[Clang 13.1.6 (clang-1316.0.21.2.5)]"
79+
},
80+
"vscode": {
81+
"interpreter": {
82+
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
83+
}
7684
}
7785
},
7886
"nbformat": 4,

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "truss"
3-
version = "0.2.0rc0"
3+
version = "0.2.0"
44
description = "A seamless bridge from model development to model delivery"
55
license = "MIT"
66
readme = "README.md"

0 commit comments

Comments
 (0)