-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #837 from basetenlabs/bump-version-0.9.2
Release 0.9.2
- Loading branch information
Showing
10 changed files
with
191 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
model_metadata: {} | ||
model_name: null | ||
model_type: custom | ||
python_version: py39 | ||
requirements: [] | ||
resources: | ||
accelerator: null | ||
cpu: 500m | ||
memory: 512Mi | ||
use_gpu: false | ||
runtime: | ||
streaming_read_timeout: 1 |
24 changes: 24 additions & 0 deletions
24
truss/test_data/test_streaming_read_timeout/model/model.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import time | ||
from typing import Any, Dict, List | ||
|
||
|
||
class Model: | ||
def __init__(self, **kwargs) -> None: | ||
self._data_dir = kwargs["data_dir"] | ||
self._config = kwargs["config"] | ||
self._secrets = kwargs["secrets"] | ||
self._model = None | ||
|
||
def load(self): | ||
# Load model here and assign to self._model. | ||
pass | ||
|
||
def predict(self, model_input: Any) -> Dict[str, List]: | ||
# Invoke model on model_input and calculate predictions here. | ||
def inner(): | ||
time.sleep(2) | ||
for i in range(5): | ||
time.sleep(3) | ||
yield str(i) | ||
|
||
return inner() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters