A Python gRPC framework for serving a machine learning module written in Python.
Project description
Rekcurd
Rekcurd is the Project for serving ML module. This is a gRPC micro-framework and it can be used like Django and Flask.
Parent Project
https://github.com/rekcurd/community
Components
- Rekcurd: Project for serving ML module.
- Rekcurd-dashboard: Project for managing ML model and deploying ML module.
- Rekcurd-client: Project for integrating ML module.
Installation
From source:
$ git clone --recursive https://github.com/rekcurd/rekcurd-python.git
$ cd rekcurd-python
$ pip install -e .
From PyPi directly:
$ pip install rekcurd
How to use
Example is available here. You can generate Rekcurd template and implement necessary methods.
$ rekcurd startapp {Your application name}
$ cd {Your application name}
$ vi app.py
$ python app.py
Unittest
$ python -m unittest
Kubernetes support
Rekcurd can be run on Kubernetes. See community repository.
Type definition
PredictLabel
type
V is the length of feature vector.
Field | Type | Description |
---|---|---|
input (required) |
One of below - string - bytes - string[V] - int[V] - double[V] |
Input data for inference. - "Nice weather." for a sentiment analysis. - PNG file for an image transformation. - ["a", "b"] for a text summarization. - [1, 2] for a sales forcast. - [0.9, 0.1] for mnist data. |
option | string | Option field. Must be json format. |
The "option" field needs to be a json format. Any style is Ok but we have some reserved fields below.
Field | Type | Description |
---|---|---|
suppress_log_input | bool | True: NOT print the input and output to the log message. False (default): Print the input and outpu to the log message. |
YOUR KEY | any | YOUR VALUE |
PredictResult
type
M is the number of classes. If your algorithm is a binary classifier, you set M to 1. If your algorithm is a multi-class classifier, you set M to the number of classes.
Field | Type | Description |
---|---|---|
label (required) |
One of below -string -bytes -string[M] -int[M] -double[M] |
Result of inference. -"positive" for a sentiment analysis. -PNG file for an image transformation. -["a", "b"] for a multi-class classification. -[1, 2] for a multi-class classification. -[0.9, 0.1] for a multi-class classification. |
score (required) |
One of below -double -double[M] |
Score of result. -0.98 for a binary classification. -[0.9, 0.1] for a multi-class classification. |
option | string | Option field. Must be json format. |
EvaluateResult
type
EvaluateResult
is the evaluation score. N is the number of evaluation data. M is the number of classes. If your algorithm is a binary classifier, you set M to 1. If your algorithm is a multi-class classifier, you set M to the number of classes.
Field | Type | Description |
---|---|---|
num (required) |
int | Number of evaluation data. |
accuracy (required) |
double | Accuracy. |
precision (required) |
double[M] | Precision. |
recall (required) |
double[M] | Recall. |
fvalue (required) |
double[M] | F1 value. |
EvaluateDetail
type
EvaluateDetail
is the details of evaluation result.
Field | Type | Description |
---|---|---|
result (required) |
PredictResult | Prediction result. |
is_correct (required) |
bool | Correct or not. |
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 rekcurd-1.0.1.post1.tar.gz
.
File metadata
- Download URL: rekcurd-1.0.1.post1.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df94e323c3ef842ea345e29f983428321c612b5939afa220a368b537564b7f76 |
|
MD5 | 77b5c76c45a4475add5c150ba7972d2a |
|
BLAKE2b-256 | 50660cff763d98366d566990c536f311e0c32ad3c1b721aaa078fbc4d5fa4dda |
File details
Details for the file rekcurd-1.0.1.post1-py2.py3-none-any.whl
.
File metadata
- Download URL: rekcurd-1.0.1.post1-py2.py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 048764fb862055becf0c353a529a1f0cbb60fceeca8c1b9015f6fd035682c4ad |
|
MD5 | 45c78eba41f992f2ac580fa73c76c99a |
|
BLAKE2b-256 | 09a23020b159d188ff82115e822bf0bd59649c7fc3d4bf379605df9753b45349 |