python grpc框架,用于提供用python编写的机器学习模块。

rekcurd的Python项目详细描述


残渣

Build StatusPyPI versioncodecovpypi supported versions

rekcurd是为ml模块提供服务的项目。这是一个grpc微框架,可以像DjangoFlask那样使用。

母项目

https://github.com/rekcurd/community

部件

安装

来源:

$ git clone --recursive https://github.com/rekcurd/rekcurd-python.git
$ cd rekcurd-python
$ pip install -e .

直接从PyPi发送:

$ pip install rekcurd

如何使用

示例可用here。可以生成Rekcurd模板并实现必要的方法

$ rekcurd startapp {Your application name}
$ cd{Your application name}
$ vi app.py
$ python app.py

单元测试

$ python -m unittest

Kubernetes支持

可以在库伯内特斯身上运行Rekcurd。见community repository

类型定义

PredictLabel类型

v是特征向量的长度。

FieldTypeDescription
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.
optionstringOption field. Must be json format.

“option”字段必须是json格式。任何样式都可以,但下面有一些保留字段。

FieldTypeDescription
suppress_log_inputboolTrue: NOT print the input and output to the log message.
False (default): Print the input and outpu to the log message.
YOUR KEYanyYOUR VALUE

PredictResult类型

m是类的数目。如果算法是二进制分类器,则将m设置为1。如果算法是多类分类器,则将m设置为类数。

FieldTypeDescription
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.
optionstringOption field. Must be json format.

EvaluateResult类型

EvaluateResult是评估分数n是计算数据的数目。m是类的数目。如果算法是二进制分类器,则将m设置为1。如果算法是多类分类器,则将m设置为类数。

FieldTypeDescription
num
(required)
intNumber of evaluation data.
accuracy
(required)
doubleAccuracy.
precision
(required)
double[M]Precision.
recall
(required)
double[M]Recall.
fvalue
(required)
double[M]F1 value.

EvaluateDetail类型

EvaluateDetail是评估结果的详细信息。

FieldTypeDescription
result
(required)
PredictResultPrediction result.
is_correct
(required)
boolCorrect or not.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java出现编译错误,我不理解   java在gnu-trove库中是否有任何有序映射?   java Servlet应该有映射,但找不到Servlet   java时间和第二期显示1:10,而不是13:10   java Play Framework 1.2.7 Heroku更新崩溃   线程“main”java中的opencsv异常。lang.NoClassDefFoundError:org/apache/commons/lang3/ObjectUtils   selenium在java中隐藏警告消息   java使用ID引用将JSON实体反序列化为POJO   java无法在JRE 8中加载字体   一个线程中的异常/错误会使整个应用程序停止吗?   java访问重复子规则的元素标签;e、 g.用ANTLR解析(1,2,3)中的a   java如何从平移旋转中找到新坐标   使用HTML Java小程序托管jar文件存在安全问题   java如何按频率而不是字母顺序排列字符串数组   java清除bufferedReader和块以获得更多输入   java解密SAML2断言