From 855cba845a8bdece53cb59e9d2f9f4c34df3ea44 Mon Sep 17 00:00:00 2001 From: wjj19950828 Date: Tue, 2 Aug 2022 00:55:56 +0800 Subject: [PATCH] add run_dynamic switch --- tests/onnx/auto_scan_test.py | 2 +- tests/onnx/onnxbase.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/onnx/auto_scan_test.py b/tests/onnx/auto_scan_test.py index e566611..614b20e 100644 --- a/tests/onnx/auto_scan_test.py +++ b/tests/onnx/auto_scan_test.py @@ -48,7 +48,7 @@ settings.register_profile( derandomize=True, report_multiple_bugs=False) if float(os.getenv('TEST_NUM_PERCENT_CASES', default='1.0')) < 1 or \ - os.getenv('HYPOTHESIS_TEST_PROFILE', 'dev') == 'ci': + os.getenv('HYPOTHESIS_TEST_PROFILE', 'dev') == 'ci': settings.load_profile("ci") else: settings.load_profile("dev") diff --git a/tests/onnx/onnxbase.py b/tests/onnx/onnxbase.py index 7f2fcc7..b5f9db7 100644 --- a/tests/onnx/onnxbase.py +++ b/tests/onnx/onnxbase.py @@ -189,12 +189,12 @@ class ONNXConverter(object): paddle_tensor_feed = list() for i in range(len(self.input_feed)): paddle_numpy_feed.append(self.input_feed[self.inputs_name[i]]) - paddle_tensor_feed.append(paddle.to_tensor(self.input_feed[self.inputs_name[i]])) + paddle_tensor_feed.append( + paddle.to_tensor(self.input_feed[self.inputs_name[i]])) if self.run_dynamic: - paddle_path = os.path.join( - self.pwd, self.name, - self.name + '_' + str(ver) + '_paddle/') + paddle_path = os.path.join(self.pwd, self.name, + self.name + '_' + str(ver) + '_paddle/') import sys sys.path.append(paddle_path) from x2paddle_code import main -- GitLab