Rekcurd is the Project for serving ML module. This is a gRPC micro-framework and it can be used like Django and Flask.
https://github.com/rekcurd/community
- Rekcurd: Project for serving ML module.
- Rekcurd-dashboard: Project for managing ML model and deploying ML module.
- Rekcurd-client: Project for integrating ML module.
From source:
$ git clone --recursive https://github.com/rekcurd/rekcurd-python.git
$ cd rekcurd-python
$ pip install -e .
From PyPi directly:
$ pip install rekcurd
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
$ python -m unittest
Rekcurd can be run on Kubernetes. See community repository.
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 |
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
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
is the details of evaluation result.
Field | Type | Description |
---|---|---|
result (required) |
PredictResult | Prediction result. |
is_correct (required) |
bool | Correct or not. |