Deploy DL/ ML inference pipelines with minimal extra code.
Project description
fastDeploy
Deploy DL/ ML inference pipelines with minimal extra code.
Installation:
pip install --upgrade fastdeploy
Usage:
# Invoke fastdeploy
fastdeploy --help
# or
python -m fastdeploy --help
# Start prediction "loop" for recipe "deepsegment"
fastdeploy --recipe ./deepsegment --mode loop
# Start rest apis for recipe "deepsegment"
fastdeploy --recipe ./deepsegment --mode rest
# Run json prediction using curl
curl -d '{"data": ["I was hungry i ordered a pizza"]}'\
-H "Content-Type: application/json" -X POST http://localhost:8080/infer
# Run file prediction using curl
curl -F image_1=@image_1.png image_2=@image_2.png http://localhost:8080/infer
# Run file prediction using python
python -c 'import requests; print(requests.post("http://localhost:8080/infer",\
json={"data": ["I was hungry i ordered a pizza"]}).json())'
# Run prediction using python
python -c 'import requests; print(requests.post("http://localhost:8080/infer",\
json={"data": ["I was hungry i ordered a pizza"]}).json())'
# Response
{'prediction': [['I was hungry', 'i ordered a pizza']], 'success': True}
# Auto genereate dockerfile and build docker image. --base is docker base
fastdeploy --recipe ./recipes/deepsegment/ \
--mode build_rest --base tensorflow/tensorflow:1.14.0-py3
# fastdeploy_deepsegment built!
# Run docker image
docker run -it -p8080:8080 fastdeploy_deepsegment
Features:
- Minimal extra code: No model exporting/ conversion/ freezing required. fastDeploy is the easiest way to serve and/or dockerize your existing inference code with minimal work.
- Fully configurable dynamic batching: fastDeploy dynamically batches concurrent requests for optimal resource usage.
- Containerization with no extra code: fastDeploy auto generates optimal dockerfiles and builds the image with no extra code.
- One consumer, multiple producers: (Coming soon) Single fastDeploy loop (consumer) can simultaneously be connected to multiple (types of) producers (rest, websocket, file).
- One producer, multiple consumers: Distribute one producer's work load to multiple consumers running on multiple nodes (assuming common storage is available for queues)
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
fastdeploy-1.0rc43.tar.gz
(54.8 kB
view hashes)
Built Distribution
Close
Hashes for fastdeploy-1.0rc43-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e14a6c73a7d27c9fa6258cc13d4e8aaa9dd4e4e188f068cf511d7376aa485fe8 |
|
MD5 | b6973ca2f9e4ba5520aefeb5031ca618 |
|
BLAKE2b-256 | 4b6558f6f6b1b89d068f8330ad295eca8b6e95888001a5cfe4aa523d883ecf23 |