drucker的python grpc客户端。
drucker-client的Python项目详细描述
#Rekcurd客户端
[![构建状态](https://travis-ci.com/rekcurd/drucker-client.svg?branch=master)(https://travis ci.com/rekcurd/drucker客户端)
[![PYPI版本](https://badge.fury.io/py/rekcurd client.svg)(https://badge.fury.io/py/rekcurd client)
[![codecov](https://codecov.io/gh/rekcurd/drucker client/branch/master/graph/badge.svg)(https://codecov.io/gh/rekcurd/drucker-client"仅限非生成包")
[![PYPI支持的版本](https://img.shields.io/pypi/pyversions/rekcurd client.svg)(https://pypi.python.org/pypi/rekcurd client)
rekcurd client是集成ML模块的项目。任何rekcurd服务都是可连接的。它可以连接kubernetes上的rekcurd服务。
-[Rekcurd Dashboard](https://github.com/rekcurd/drucker Dashboard):管理ML模型和部署ML模块的项目。
-[Rekcurd客户端](https://github.com/rekcurd/drucker-client)(此处):集成ML模块的项目。
rekcurd嫒u client
```
嫒how to use
示例代码[此处](./example/sample.py)。
``python
from drucker嫒client import druckerworkerclient
from drucker嫒client.logger import logger
host='localhost:5000'
client=DruckerWorkRClient(logger=logger,host=host)
input=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,10,0,0,0,0,0,2,
16,4,0,0]
response=client。使用kubernetes并通过rekcurd仪表板部署rekcurd服务时,运行"预测"arrint(input)
```
,您可以访问您的rekcurd服务,如下所示。
``python
from drucker_client import druckerworkerclient
from drucker_client.logger import logger
domain='example.com'
app='drucker sample'
env='development'
client=DruckerWorkRClient(logger=logger,domain=domain,app=app,env=env)
输入=[0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,13,
>6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,
0,3,15,10,0,0,0,0,2,
16,4,0,0]
response=client.运行预测arrint arrint(input)
`````
这些方法是根据输入和输出格式生成的。*v*是特征向量的长度。*M*是类的数目。如果算法是二进制分类器,则将*m*设置为1。如果算法是多类分类器,则将*m*设置为类数。
(必选)输出:option;
;:--;:--;:--;:--;:--;:--;
;
;;run _predic_string string string(json)string double string(json)string(json)string(json);
;
run run predic string(json)string string string string(json)
运行预测_字符串arrint字符串字符串(json)| int[*m*]double[*m*]string(json)string(json)
run run run run run run run run run run run run run string string string(json)stri运行_predict_bytes string bytes string(json)string|双字符串(json)
运行预测字节字节字符串(json)字节双字符串(j
run run run run run run run run run run run run run run run run run run run predict bytes bytes bytes bytes string(json)string[*m*]double[*m*]string(json)|
run run run run run run run run predic string run run predic arrint run run predic arrint run run run run predic arrint stri[*m*]双[*m*]字符串(JSON)|
run run run run run predict arrint int[*v*]]string(json)
run run run run predict run run predict arrint int run run run predict string double[*v*]字符串(json)字符串double字符串(json)|
run run arrrfloat double string(json);
run run run run run run
run run prec arrrfloat run predic arrrfloat string bibi;字符串(json)双[*m*]双[*m*]字符串(json)|
run
run run run predict_arrrstring string[*v*]string(json)int[*m*]double[*m*]]string(json);
run run run run predict_arrrstring string[*v*]string(json)string run run run predict run arrrstring string;字符串[*v*]字符串(json)字符串[*m*]| double[*m*]string(json)
输入"option"字段必须是json格式。任何样式都可以,但下面有一些保留字段。
<;br>;false(默认值):打印日志消息的输入和输出。
[![构建状态](https://travis-ci.com/rekcurd/drucker-client.svg?branch=master)(https://travis ci.com/rekcurd/drucker客户端)
[![PYPI版本](https://badge.fury.io/py/rekcurd client.svg)(https://badge.fury.io/py/rekcurd client)
[![codecov](https://codecov.io/gh/rekcurd/drucker client/branch/master/graph/badge.svg)(https://codecov.io/gh/rekcurd/drucker-client"仅限非生成包")
[![PYPI支持的版本](https://img.shields.io/pypi/pyversions/rekcurd client.svg)(https://pypi.python.org/pypi/rekcurd client)
rekcurd client是集成ML模块的项目。任何rekcurd服务都是可连接的。它可以连接kubernetes上的rekcurd服务。
-[Rekcurd Dashboard](https://github.com/rekcurd/drucker Dashboard):管理ML模型和部署ML模块的项目。
-[Rekcurd客户端](https://github.com/rekcurd/drucker-client)(此处):集成ML模块的项目。
rekcurd嫒u client
```
嫒how to use
示例代码[此处](./example/sample.py)。
``python
from drucker嫒client import druckerworkerclient
from drucker嫒client.logger import logger
host='localhost:5000'
client=DruckerWorkRClient(logger=logger,host=host)
input=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,10,0,0,0,0,0,2,
16,4,0,0]
response=client。使用kubernetes并通过rekcurd仪表板部署rekcurd服务时,运行"预测"arrint(input)
```
,您可以访问您的rekcurd服务,如下所示。
``python
from drucker_client import druckerworkerclient
from drucker_client.logger import logger
domain='example.com'
app='drucker sample'
env='development'
client=DruckerWorkRClient(logger=logger,domain=domain,app=app,env=env)
输入=[0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,13,
>6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,
0,3,15,10,0,0,0,0,2,
16,4,0,0]
response=client.运行预测arrint arrint(input)
`````
这些方法是根据输入和输出格式生成的。*v*是特征向量的长度。*M*是类的数目。如果算法是二进制分类器,则将*m*设置为1。如果算法是多类分类器,则将*m*设置为类数。
(必选)输出:option;
;:--;:--;:--;:--;:--;:--;
;
;;run _predic_string string string(json)string double string(json)string(json)string(json);
;
run run predic string(json)string string string string(json)
运行预测_字符串arrint字符串字符串(json)| int[*m*]double[*m*]string(json)string(json)
run run run run run run run run run run run run run string string string(json)stri运行_predict_bytes string bytes string(json)string|双字符串(json)
运行预测字节字节字符串(json)字节双字符串(j
run run run run run run run run run run run run run run run run run run run predict bytes bytes bytes bytes string(json)string[*m*]double[*m*]string(json)|
run run run run run run run run predic string run run predic arrint run run predic arrint run run run run predic arrint stri[*m*]双[*m*]字符串(JSON)|
run run run run run predict arrint int[*v*]]string(json)
run run run run predict run run predict arrint int run run run predict string double[*v*]字符串(json)字符串double字符串(json)|
run run arrrfloat double string(json);
run run run run run run
run run prec arrrfloat run predic arrrfloat string bibi;字符串(json)双[*m*]双[*m*]字符串(json)|
run
run run run run predict_arrrstring string[*v*]string(json)string run run run predict run arrrstring string;字符串[*v*]字符串(json)字符串[*m*]| double[*m*]string(json)
输入"option"字段必须是json格式。任何样式都可以,但下面有一些保留字段。
<;br>;false(默认值):打印日志消息的输入和输出。