丁云鹏 4 meses atrás
pai
commit
b3c92a812f

+ 1 - 0
recommend-model-produce/src/main/python/tools/static_ps_infer_v2.py

@@ -55,6 +55,7 @@ class InferenceFetchHandler(FetchHandler):
     def __init__(self, var_dict, output_file, batch_size=1000):
         super().__init__(var_dict=var_dict, period_secs=1)
         self.output_file = output_file
+        self.batch_size = batch_size
         self.result_queue = queue.Queue()
         self.writer_thread = threading.Thread(target=self._writer)
         self.writer_thread.daemon = True  # 设置为守护线程