GithubHelp home page GithubHelp logo

notai-tech / fastdeploy Goto Github PK

View Code? Open in Web Editor NEW
95.0 8.0 17.0 16.09 MB

Deploy DL/ ML inference pipelines with minimal extra code.

License: MIT License

Python 100.00%
deep-learning tensorflow-serving tf-serving pytorch serving falcon gevent docker model-deployment model-serving http-server gunicorn torchserve triton-inference-server python triton triton-server inference-server streaming-audio websocket

fastdeploy's Introduction

fastDeploy

easy and performant micro-services for Python Deep Learning inference pipelines

  • Deploy any python inference pipeline with minimal extra code
  • Auto batching of concurrent inputs is enabled out of the box
  • no changes to inference code (unlike tf-serving etc), entire pipeline is run as is
  • Promethues metrics (open metrics) are exposed for monitoring
  • Auto generates clean dockerfiles and kubernetes health check, scaling friendly APIs
  • sequentially chained inference pipelines are supported out of the box
  • can be queried from any language via easy to use rest apis
  • easy to understand (simple consumer producer arch) and simple code base

Installation:

pip install --upgrade fastdeploy fdclient
# fdclient is optional, only needed if you want to use python client

Start fastDeploy server on a recipe:

# Invoke fastdeploy 
python -m fastdeploy --help
# or
fastdeploy --help

# Start prediction "loop" for recipe "echo"
fastdeploy --loop --recipe recipes/echo

# Start rest apis for recipe "echo"
fastdeploy --rest --recipe recipes/echo

Send a request and get predictions:

auto generate dockerfile and build docker image:

# Write the dockerfile for recipe "echo"
# and builds the docker image if docker is installed
# base defaults to python:3.8-slim
fastdeploy --build --recipe recipes/echo

# Run docker image
docker run -it -p8080:8080 fastdeploy_echo

Serving your model (recipe):

Where to use fastDeploy?

  • to deploy any non ultra light weight models i.e: most DL models, >50ms inference time per example
  • if the model/pipeline benefits from batch inference, fastDeploy is perfect for your use-case
  • if you are going to have individual inputs (example, user's search input which needs to be vectorized or image to be classified)
  • in the case of individual inputs, requests coming in at close intervals will be batched together and sent to the model as a batch
  • perfect for creating internal micro services separating your model, pre and post processing from business logic
  • since prediction loop and inference endpoints are separated and are connected via sqlite backed queue, can be scaled independently

Where not to use fastDeploy?

  • non cpu/gpu heavy models that are better of running parallely rather than in batch
  • if your predictor calls some external API or uploads to s3 etc in a blocking way
  • io heavy non batching use cases (eg: query ES or db for each input)
  • for these cases better to directly do from rest api code (instead of consumer producer mechanism) so that high concurrency can be achieved

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.