Skip to content

Commit 67c1396

Browse files
authored
Merge pull request #47 from rekcurd/fix/update-doc-for-v1.0.0
Merged
2 parents 803763d + f711d1c commit 67c1396

1 file changed

Lines changed: 54 additions & 5 deletions

File tree

README.md

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
[![codecov](https://codecov.io/gh/rekcurd/rekcurd-python/branch/master/graph/badge.svg)](https://codecov.io/gh/rekcurd/rekcurd-python "Non-generated packages only")
66
[![pypi supported versions](https://img.shields.io/pypi/pyversions/rekcurd.svg)](https://pypi.python.org/pypi/rekcurd)
77

8-
Rekcurd is the Project for serving ML module. This is a gRPC micro-framework and it can be used like [Flask](http://flask.pocoo.org/).
8+
Rekcurd is the Project for serving ML module. This is a gRPC micro-framework and it can be used like [Django](https://docs.djangoproject.com/) and [Flask](http://flask.pocoo.org/).
99

1010

1111
## Parent Project
1212
https://github.com/rekcurd/community
1313

1414

1515
## Components
16-
- [Rekcurd](https://github.com/rekcurd/rekcurd-python) (here): Project for serving ML module.
16+
- [Rekcurd](https://github.com/rekcurd/rekcurd-python): Project for serving ML module.
1717
- [Rekcurd-dashboard](https://github.com/rekcurd/dashboard): Project for managing ML model and deploying ML module.
18-
- [Rekcurd-client](https://github.com/rekcurd/python-client): Project for integrating ML module.
18+
- [Rekcurd-client](https://github.com/rekcurd/python-client): Project for integrating ML module.
1919

2020

2121
## Installation
@@ -34,10 +34,13 @@ $ pip install rekcurd
3434
```
3535

3636
## How to use
37-
Example code is available [here](https://github.com/rekcurd/rekcurd-example/tree/master/python/sklearn-digits). You can generate Rekcurd application template by a following command.
37+
Example is available [here](https://github.com/rekcurd/rekcurd-example/tree/master/python/sklearn-digits). You can generate Rekcurd template and implement necessary methods.
3838

3939
```bash
4040
$ rekcurd startapp {Your application name}
41+
$ cd {Your application name}
42+
$ vi app.py
43+
$ python app.py
4144
```
4245

4346

@@ -46,5 +49,51 @@ $ rekcurd startapp {Your application name}
4649
$ python -m unittest
4750
```
4851

52+
4953
## Kubernetes support
50-
Rekcurd can be run on Kubernetes. See [here](https://github.com/rekcurd/community).
54+
Rekcurd can be run on Kubernetes. See [community repository](https://github.com/rekcurd/community).
55+
56+
57+
## Type definition
58+
### `PredictLabel` type
59+
*V* is the length of feature vector.
60+
61+
|Field |Type |Description |
62+
|:---|:---|:---|
63+
|input <BR>(required) |One of below<BR>- string<BR>- bytes<BR>- string[*V*]<BR>- int[*V*]<BR>- double[*V*] |Input data for inference.<BR>- "Nice weather." for a sentiment analysis.<BR>- PNG file for an image transformation.<BR>- ["a", "b"] for a text summarization.<BR>- [1, 2] for a sales forcast.<BR>- [0.9, 0.1] for mnist data. |
64+
|option |string| Option field. Must be json format. |
65+
66+
The "option" field needs to be a json format. Any style is Ok but we have some reserved fields below.
67+
68+
|Field |Type |Description |
69+
|:---|:---|:---|
70+
|suppress_log_input |bool |True: NOT print the input and output to the log message. <BR>False (default): Print the input and outpu to the log message. |
71+
|YOUR KEY |any |YOUR VALUE |
72+
73+
### `PredictResult` type
74+
*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.
75+
76+
|Field |Type |Description |
77+
|:---|:---|:---|
78+
|label<BR>(required) |One of below<BR> -string<BR> -bytes<BR> -string[*M*]<BR> -int[*M*]<BR> -double[*M*] |Result of inference.<BR> -"positive" for a sentiment analysis.<BR> -PNG file for an image transformation.<BR> -["a", "b"] for a multi-class classification.<BR> -[1, 2] for a multi-class classification.<BR> -[0.9, 0.1] for a multi-class classification. |
79+
|score<BR>(required) |One of below<BR> -double<BR> -double[*M*] |Score of result.<BR> -0.98 for a binary classification.<BR> -[0.9, 0.1] for a multi-class classification. |
80+
|option |string |Option field. Must be json format. |
81+
82+
### `EvaluateResult` type
83+
`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.
84+
85+
|Field |Type |Description |
86+
|:---|:---|:---|
87+
|num<BR>(required)|int |Number of evaluation data. |
88+
|accuracy<BR>(required) |double |Accuracy. |
89+
|precision<BR>(required) |double[*M*] |Precision. |
90+
|recall<BR>(required) |double[*M*] |Recall. |
91+
|fvalue<BR>(required) |double[*M*] |F1 value. |
92+
93+
### `EvaluateDetail` type
94+
`EvaluateDetail` is the details of evaluation result.
95+
96+
|Field |Type |Description |
97+
|:---|:---|:---|
98+
|result<BR>(required) |PredictResult |Prediction result. |
99+
|is_correct<BR>(required) |bool |Correct or not. |

0 commit comments

Comments
 (0)