提交 b2e1a9b5 编写于 作者: T TeslaZhao

set alias_name as feed_var name

上级 9183a5ec
...@@ -323,10 +323,7 @@ class Client(object): ...@@ -323,10 +323,7 @@ class Client(object):
string_feed_names = [] string_feed_names = []
string_lod_slot_batch = [] string_lod_slot_batch = []
string_shape = [] string_shape = []
fetch_names = [] fetch_names = []
counter = 0
batch_size = len(feed_batch)
for key in fetch_list: for key in fetch_list:
if key in self.fetch_names_: if key in self.fetch_names_:
...@@ -335,7 +332,6 @@ class Client(object): ...@@ -335,7 +332,6 @@ class Client(object):
if len(fetch_names) == 0: if len(fetch_names) == 0:
raise ValueError( raise ValueError(
"Fetch names should not be empty or out of saved fetch list.") "Fetch names should not be empty or out of saved fetch list.")
return {}
for i, feed_i in enumerate(feed_batch): for i, feed_i in enumerate(feed_batch):
int_slot = [] int_slot = []
......
...@@ -91,7 +91,7 @@ class WebService(object): ...@@ -91,7 +91,7 @@ class WebService(object):
f = open(file_path_list[0], 'r') f = open(file_path_list[0], 'r')
model_conf = google.protobuf.text_format.Merge( model_conf = google.protobuf.text_format.Merge(
str(f.read()), model_conf) str(f.read()), model_conf)
self.feed_vars = {var.name: var for var in model_conf.feed_var} self.feed_vars = {var.alias_name: var for var in model_conf.feed_var}
if len(file_path_list) > 1: if len(file_path_list) > 1:
model_conf = m_config.GeneralModelConfig() model_conf = m_config.GeneralModelConfig()
...@@ -99,7 +99,7 @@ class WebService(object): ...@@ -99,7 +99,7 @@ class WebService(object):
model_conf = google.protobuf.text_format.Merge( model_conf = google.protobuf.text_format.Merge(
str(f.read()), model_conf) str(f.read()), model_conf)
self.fetch_vars = {var.name: var for var in model_conf.fetch_var} self.fetch_vars = {var.alias_name: var for var in model_conf.fetch_var}
if client_config_path == None: if client_config_path == None:
self.client_config_path = file_path_list self.client_config_path = file_path_list
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册