From 9a6efd3a9353eace1a4ad41e93309f8f03a94f04 Mon Sep 17 00:00:00 2001 From: UltralyticsAssistant Date: Tue, 26 Nov 2024 09:47:04 +0000 Subject: [PATCH] Auto-format by https://ultralytics.com/actions --- tests/test_onnxslim.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_onnxslim.py b/tests/test_onnxslim.py index 9338f83..5536376 100644 --- a/tests/test_onnxslim.py +++ b/tests/test_onnxslim.py @@ -19,7 +19,7 @@ def __test_command_basic(self, request, in_model_path=FILENAME, out_model_name=" out_model_path = os.path.join(tempdir, out_model_name) slim(in_model_path, out_model_path) slim(in_model_path, out_model_path, model_check=True) - command = f"onnxslim {arg_str} \"{in_model_path}\" \"{out_model_path}\"" + command = f'onnxslim {arg_str} "{in_model_path}" "{out_model_path}"' result = subprocess.run(command, shell=True, capture_output=True, text=True) output = result.stderr.strip() # Assert the expected return code @@ -39,9 +39,7 @@ def test_input_shape_modification(self, request): def test_fp322fp16_conversion(self, request): """Test the conversion of an ONNX model from FP32 to FP16 precision.""" dtype_fp16_arg_str = "--dtype fp16" - _, out_model_path = self.__test_command_basic( - request, FILENAME, "resnet18_fp16.onnx", dtype_fp16_arg_str - ) + _, out_model_path = self.__test_command_basic(request, FILENAME, "resnet18_fp16.onnx", dtype_fp16_arg_str) dtype_fp32_arg_str = "--dtype fp32" self.__test_command_basic(request, out_model_path, "resnet18_fp32.onnx", dtype_fp32_arg_str)