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-client
From Github repository: 1. git clone git@github.com:Yoctol/serving-utils.git 2. make install
Usage
Client ```python from serving_utils import Client
client = Client(addr=”localhost:8500”) client.predict(…)
or async
await client.async_predict(…) ```
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={‘tensor_name’: tf.Tensor…}, outputs={‘tensor_name’: tf.Tensor…}, ) }, ) saver.save(…)
## 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.4.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 685a1792be7e696fce07d2d7f4040b74a639206c48785a3e62597a7b43628141 |
|
MD5 | 9396e3230336e32dd23551d94dcebcd5 |
|
BLAKE2b-256 | f94d9292fb7a4d82a7faf271add8f61aa69e91b02513e741c6e25fc086c7a55e |