minimalistic ML-models auto deployment tool
Project description
DeployMe
If you have been working on ML models, then you have probably faced the task of deploying these models. Perhaps you are participating in a hackathon or want to show your work to management.
According to our survey, more than 60%
of the data-scientists surveyed faced this task and more than 60%
of the respondents spent more than half an hour creating such a service.
The most common solution is to wrap it in some kind of web framework (like Flask).
Our team believes that it can be made even easier!
Our tool automatically collects all the necessary files and dependencies, creates a docker container, and launches it! And all this in one line of source code.
Pipeline
- First, we initialize the project directory for the next steps;
- Next, we serialize your machine learning models (for example, with Joblib or Pickle);
- Next, we create a final
.py
file based on the templates that contains the endpoint handlers. Handlers are chosen based on models, and templates based on your preferences (templates are also.py
files using, for example, Sanic or Flask); - Copy or additionally generate the necessary files (e.g. Dockerfile);
- The next step is to compile the API documentation for your project;
- After these steps, we build a Docker container, or a Python package, or we just leave the final directory and then we can deploy your project in Kubernetes, or in Heroku.
Prerequisites
On your PC with local run you must have Docker & Python >= 3.8
Installation
Install deployme
with pip:
pip install deployme
or with your favorite package manager.
Example
from sklearn.datasets import load_iris
from sklearn.ensemble import RandomForestClassifier
from deployme import cook
X, y = load_iris(return_X_y=True, as_frame=True)
clf = RandomForestClassifier()
clf.fit(X, y)
cook(strategy="docker", model=clf, port=5010)
After running script you can see new Docker container. To interact with service simply open URL, logged after script running.
On this page you can see Swagger UI, test simple requests (examples included). For direct post-requests you can use Curl:
curl -X POST "http://127.0.0.1:5001/predict" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"data\":[{\"sepal length (cm)\":5.8,\"sepal width (cm)\":2.7,\"petal length (cm)\":3.9,\"petal width (cm)\":1.2}]}"
Models support
Currently, we support the following models:
sklearn
xgboost
RoadMap
- Deploy to Heroku & clusters
- Model's basic vizualization
- Tighter integration with LightAutoML
- Support many popular ML-frameworks, such as
XGBoost
,TensorFlow
,CatBoost
, etc. - Your ideas!
Contribution
We are always open to your contributions! Please check our issue's and make PR.
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
File details
Details for the file deployme-0.1.0.tar.gz
.
File metadata
- Download URL: deployme-0.1.0.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/5.0.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f62d47d5d615ffef196e35e5d07c09b81bfe2d18fb97a27ddde9ec72d4ea9ddd |
|
MD5 | a093dd7ce125f4a4c8aeed91f77923f6 |
|
BLAKE2b-256 | 1af7ad1da190befc1aca8d36423c762725239c140ae101a819ef7a91c4447b78 |
File details
Details for the file deployme-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: deployme-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/5.0.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34dbdd9b01ce12ea8ab281e9ee27cc1e28b4296963c5d7b4c4f3f8877c3ae460 |
|
MD5 | 0d143c092888299a3e78effda6d0060a |
|
BLAKE2b-256 | a01e30d36831039c19255743537b24f6f65c5a838856cdfcac7f27d6eb1c1981 |