diff --git a/framework/e2e/PaddleLT_new/engine/paddle_infer.py b/framework/e2e/PaddleLT_new/engine/paddle_infer.py index 3e29bb4536..4ab35e7f1a 100644 --- a/framework/e2e/PaddleLT_new/engine/paddle_infer.py +++ b/framework/e2e/PaddleLT_new/engine/paddle_infer.py @@ -14,6 +14,8 @@ from generator.builder_layer import BuildLayer from generator.builder_data import BuildData +from tools.logger import Logger + class LayerInfer(object): """ @@ -41,7 +43,7 @@ def paddle_infer_gpu(self): """infer load (layer)""" reset(self.seed) if not os.path.exists(self.path + ".pdiparams"): - Logger("paddle_infer_gpu").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试") + Logger("paddle_infer_gpu").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试") return {"res": {"logit": None}} config = paddle_infer.Config(self.path + ".pdmodel", self.path + ".pdiparams") @@ -70,7 +72,7 @@ def paddle_infer_cpu(self): """infer load (layer)""" reset(self.seed) if not os.path.exists(self.path + ".pdiparams"): - Logger("paddle_infer_cpu").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试") + Logger("paddle_infer_cpu").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试") return {"res": {"logit": None}} config = paddle_infer.Config(self.path + ".pdmodel", self.path + ".pdiparams") @@ -100,7 +102,7 @@ def paddle_infer_mkldnn(self): """infer load (layer)""" reset(self.seed) if not os.path.exists(self.path + ".pdiparams"): - Logger("paddle_infer_mkldnn").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试") + Logger("paddle_infer_mkldnn").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试") return {"res": {"logit": None}} config = paddle_infer.Config(self.path + ".pdmodel", self.path + ".pdiparams") @@ -132,7 +134,7 @@ def paddle_infer_ort(self): """infer load (layer)""" reset(self.seed) if not os.path.exists(self.path + ".pdiparams"): - Logger("paddle_infer_ort").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试") + Logger("paddle_infer_ort").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试") return {"res": {"logit": None}} config = paddle_infer.Config(self.path + ".pdmodel", self.path + ".pdiparams") @@ -163,7 +165,7 @@ def paddle_infer_new_exc_pir(self): """infer load (layer)""" reset(self.seed) if not os.path.exists(self.path + ".pdiparams"): - Logger("paddle_infer_new_exc_pir").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试") + Logger("paddle_infer_new_exc_pir").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试") return {"res": {"logit": None}} config = paddle_infer.Config(self.path + ".json", self.path + ".pdiparams")