From 3f7cf5a5a3d3f9e6dfeef9063e373a2da2d41b5d Mon Sep 17 00:00:00 2001 From: TeslaZhao Date: Thu, 5 Nov 2020 14:36:11 +0800 Subject: [PATCH] update gateway default params filter --- python/pipeline/gateway/proxy_server.go | 3 ++- python/pipeline/operator.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/pipeline/gateway/proxy_server.go b/python/pipeline/gateway/proxy_server.go index cadc1567..65431709 100644 --- a/python/pipeline/gateway/proxy_server.go +++ b/python/pipeline/gateway/proxy_server.go @@ -38,7 +38,8 @@ func run_proxy_server(grpc_port int, http_port int) error { ctx, cancel := context.WithCancel(ctx) defer cancel() - mux := runtime.NewServeMux() + //EmitDefaults=true, does not filter out the default inputs + mux := runtime.NewServeMux(runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{OrigName: true, EmitDefaults: true})) opts := []grpc.DialOption{grpc.WithInsecure()} err := gw.RegisterPipelineServiceHandlerFromEndpoint(ctx, mux, *pipelineEndpoint, opts) if err != nil { diff --git a/python/pipeline/operator.py b/python/pipeline/operator.py index e072c825..e980031c 100644 --- a/python/pipeline/operator.py +++ b/python/pipeline/operator.py @@ -333,7 +333,7 @@ class Op(object): call_result.pop("serving_status_code") return call_result - def postprocess(self, input_dict, fetch_dict, logid_dict): + def postprocess(self, input_dict, fetch_dict, log_id): """ In postprocess stage, assemble data for next op or output. Args: -- GitLab