Some utilities for tensorflow serving
Project description
serving-utils
Some python utilities when using tensorflow-serving.
Installation
From PYPI: 1. Manually install tensorflow CPU or GPU version. 2. pip install serving-utils
From Github repository: 1. git clone git@github.com:Yoctol/serving-utils.git 2. make install
Usage
Saver ```python import tensorflow as tf
from serving_utils import Saver
saver = Saver( session=tf.Session(graph=your_graph), output_dir=’/path/to/serving’, signature_def_map={ ‘predict’: tf.saved_model.signature_def_utils.predict_signature_def( inputs={‘input’: tf.Tensor…}, outputs={‘output’: tf.Tensor…}, ) }, ) saver.save(…) ```
Saver ```python from serving_utils import Client, PredictInput
client = Client(addr=”localhost:8500”) client.predict( [PredictInput(name=’input’, value=np.ones(1, 10))], output_names=[‘output’], model_signature_name=’predict’, )
or async
await client.async_predict(…)
## Test Run the following commands:
make lint make test
## Dev
make install ```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for serving_utils-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9c19906aef5664d77d5c0907a322c9ff72aae0cfc90f07a925d07a5ee5491e2 |
|
MD5 | 278041c0f9e058a863bb881a4e4ed484 |
|
BLAKE2b-256 | 1532687e5b0b4f827fe8d1df3760b159e20452d76b8a52b8c91d64de9c395dc3 |