From 2455e94a116dfeb48dff6341dba2609737caf5a6 Mon Sep 17 00:00:00 2001 From: MRXLT Date: Fri, 15 May 2020 09:38:58 +0000 Subject: [PATCH] ensemble support py3 --- python/paddle_serving_server/__init__.py | 3 ++- python/paddle_serving_server_gpu/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/paddle_serving_server/__init__.py b/python/paddle_serving_server/__init__.py index f4f3248c..7db647f9 100644 --- a/python/paddle_serving_server/__init__.py +++ b/python/paddle_serving_server/__init__.py @@ -274,7 +274,8 @@ class Server(object): self.model_config_paths[node.name] = path print("You have specified multiple model paths, please ensure " "that the input and output of multiple models are the same.") - workflow_oi_config_path = self.model_config_paths.items()[0][1] + workflow_oi_config_path = list(self.model_config_paths.items())[0][ + 1] else: raise Exception("The type of model_config_paths must be str or " "dict({op: model_path}), not {}.".format( diff --git a/python/paddle_serving_server_gpu/__init__.py b/python/paddle_serving_server_gpu/__init__.py index 5a06bd71..7acc926c 100644 --- a/python/paddle_serving_server_gpu/__init__.py +++ b/python/paddle_serving_server_gpu/__init__.py @@ -320,7 +320,8 @@ class Server(object): self.model_config_paths[node.name] = path print("You have specified multiple model paths, please ensure " "that the input and output of multiple models are the same.") - workflow_oi_config_path = self.model_config_paths.items()[0][1] + workflow_oi_config_path = list(self.model_config_paths.items())[0][ + 1] else: raise Exception("The type of model_config_paths must be str or " "dict({op: model_path}), not {}.".format( -- GitLab