|
@@ -73,8 +73,6 @@ class InferenceFetchHandler(FetchHandler):
|
|
|
"""处理每批次的推理结果"""
|
|
|
result_dict = {}
|
|
|
|
|
|
- super().handler(res_dict=fetch_vars)
|
|
|
-
|
|
|
for key in fetch_vars:
|
|
|
# 转换数据类型
|
|
|
if type(fetch_vars[key]) is np.ndarray:
|
|
@@ -89,6 +87,7 @@ class InferenceFetchHandler(FetchHandler):
|
|
|
while True:
|
|
|
try:
|
|
|
result_dict = self.result_queue.get(timeout=1) # 非阻塞获取
|
|
|
+ logger.info("write vector {}".format(result_dict))
|
|
|
batch.append(result_dict)
|
|
|
if len(batch) >= self.batch_size:
|
|
|
logger.info("write vector")
|