|
12 | 12 | # language governing permissions and limitations under the License. |
13 | 13 | from __future__ import absolute_import |
14 | 14 |
|
15 | | -import textwrap |
16 | 15 | from unittest.mock import MagicMock, patch, Mock, mock_open |
17 | 16 |
|
18 | 17 | import unittest |
@@ -2701,7 +2700,7 @@ def test_optimize_exclusive_sharding_args(self, mock_get_serve_setting): |
2701 | 2700 |
|
2702 | 2701 | self.assertRaisesRegex( |
2703 | 2702 | ValueError, |
2704 | | - "OPTION_TENSOR_PARALLEL_DEGREE is required environment variable with Sharding config.", |
| 2703 | + "OPTION_TENSOR_PARALLEL_DEGREE is a required environment variable with sharding config.", |
2705 | 2704 | lambda: model_builder.optimize( |
2706 | 2705 | instance_type="ml.g5.24xlarge", |
2707 | 2706 | sharding_config={"OverrideEnvironment": {"OPTION_QUANTIZE": "awq"}}, |
@@ -2876,13 +2875,9 @@ def test_trt_and_vllm_configurations_throw_errors_for_rule_set(self): |
2876 | 2875 | ) |
2877 | 2876 |
|
2878 | 2877 | # Invalid quantization technique |
2879 | | - expected_quantization_error_message = """ |
2880 | | - Optimization cannot be performed for the following reasons: |
2881 | | - - Optimizations that use Quantization:test are not supported for GPU instances. |
2882 | | - """ |
2883 | 2878 | self.assertRaisesRegex( |
2884 | 2879 | ValueError, |
2885 | | - textwrap.dedent(expected_quantization_error_message), |
| 2880 | + "Optimizations that use Quantization:test are not supported for GPU instances.", |
2886 | 2881 | lambda: _validate_optimization_configuration( |
2887 | 2882 | instance_type="ml.g5.24xlarge", |
2888 | 2883 | quantization_config={ |
|
0 commit comments