From d78726eb329922016fa3f49ebaa5273ee6e50389 Mon Sep 17 00:00:00 2001 From: Samrudhi Sharma Date: Wed, 20 Mar 2024 04:50:02 +0000 Subject: [PATCH] Format --- .../sagemaker/serve/utils/test_hardware_detector.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/unit/sagemaker/serve/utils/test_hardware_detector.py b/tests/unit/sagemaker/serve/utils/test_hardware_detector.py index 688c572e72..8efbadfea4 100644 --- a/tests/unit/sagemaker/serve/utils/test_hardware_detector.py +++ b/tests/unit/sagemaker/serve/utils/test_hardware_detector.py @@ -66,7 +66,7 @@ def test_get_gpu_info_describe_instance_types_throws(sagemaker_session, boto_ses "Error": { "Code": "InvalidInstanceType", "Message": f"An error occurred (InvalidInstanceType) when calling the DescribeInstanceTypes " - f"operation: The following supplied instance types do not exist: [{INVALID_INSTANCE_TYPE}]", + f"operation: The following supplied instance types do not exist: [{INVALID_INSTANCE_TYPE}]", } }, "DescribeInstanceTypes", @@ -104,15 +104,16 @@ def test_format_instance_type_without_ml_success(): @patch("sagemaker.serve.utils.hardware_detector.estimate_command_parser") @patch("sagemaker.serve.utils.hardware_detector.gather_data") def test_total_inference_model_size_mib( - mock_gather_data, - mock_parser, + mock_gather_data, + mock_parser, ): mock_parser.return_value = Mock() mock_gather_data.return_value = [[1, 1, 1, 1]] product = MIB_CONVERSION_FACTOR * 1 * MEMORY_BUFFER_MULTIPLIER - assert hardware_detector._total_inference_model_size_mib("stable-diffusion", "float32") == \ - product + assert ( + hardware_detector._total_inference_model_size_mib("stable-diffusion", "float32") == product + ) mock_parser.return_value = Mock() mock_gather_data.return_value = None