diff --git a/python/pipeline/pipeline_client.py b/python/pipeline/pipeline_client.py index cff7e9c3f77db88c762383b83dc466ed2a8240ae..a7aeb548008354bd1a17c4b39596575c6594e39b 100644 --- a/python/pipeline/pipeline_client.py +++ b/python/pipeline/pipeline_client.py @@ -98,6 +98,12 @@ class PipelineClient(object): else: # pack tensor format for key, value in feed_dict.items(): + + # skipping the lod feed_var. + # The declare of lod feed_var must be hebind the feed_var. + if ".lod" in key: + continue + one_tensor = req.tensors.add() one_tensor.name = key @@ -114,6 +120,13 @@ class PipelineClient(object): for one_dim in value.shape: one_tensor.shape.append(one_dim) + # set lod info, must be list type. + lod_key = key + ".lod" + if lod_key in feed_dict: + lod_list = feed_dict.get(lod_key) + if lod_list is not None: + one_tensor.lod.extend(lod_list) + # packed into bytes if use_tensor_bytes is True: np_bytes = BytesIO()