Created by: barrierye
- Pipeline 添加 ocr example
- 将 grpc-gateway 作为 pipeline yaml 的一个选项(同时编译流程中添加安装 go 依赖的步骤,详见
python/examples/pipeline
下的所有例子) - 添加 LocalRpcServiceHandler 模块,以支持 Pipeline 在本地自动起 ServingService(远程模式/本地模式/远程、本地混合模式,详见
python/examples/pipeline/ocr
) - 更新 WebService 接口以支持 Pipeline(详见
python/examples/pipeline/simple_web_service
)
Pipeline WebService 与原 WebService 的区别:
- preprocess 和 postporcess 的参数不同(个数、含义) 原 WebService 如下:
def preprocess(self, feed={}, fetch=[])
def postprocess(self, feed={}, fetch=[], fetch_map=None)
Op 没有 fetch
参数;并且受Pipeline proto限制,input_dict 的value均要求是 str
类型,需要用户自己解析:
def preprocess(self, input_dicts)
def postprocess(self, input_dicts, fetch_dict)
- Pipeline WebService 不能一键启动:
由于第一点 input_dict 的 value 均是
str
类型,通常情况下需要用户解析成ndarray
,故不能一键启动。 - POST json 不同: 原 WebService:{"feed":[{"x": [...]}], "fetch":["price"]} Pipeline WebService:{"key":["x"], "value": ["..."]}
fix #811 (closed)