Skip to content

Commit 5833143

Browse files
author
Ashish Gupta
committed
remove UTs for now
1 parent b19b4a3 commit 5833143

File tree

2 files changed

+2
-57
lines changed

2 files changed

+2
-57
lines changed

tests/unit/sagemaker/serve/builder/test_model_builder.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,40 +2667,6 @@ def test_optimize_exclusive_args(self, mock_get_serve_setting):
26672667
),
26682668
)
26692669

2670-
@patch.object(ModelBuilder, "_get_serve_setting", autospec=True)
2671-
def test_optimize_exclusive_sharding(self, mock_get_serve_setting):
2672-
mock_sagemaker_session = Mock()
2673-
model_builder = ModelBuilder(
2674-
model="meta-textgeneration-llama-3-70b",
2675-
sagemaker_session=mock_sagemaker_session,
2676-
)
2677-
2678-
self.assertRaisesRegex(
2679-
ValueError,
2680-
"Sharding config is mutually exclusive and cannot be combined with any other optimization.",
2681-
lambda: model_builder.optimize(
2682-
quantization_config={"OverrideEnvironment": {"OPTION_QUANTIZE": "awq"}},
2683-
compilation_config={"OverrideEnvironment": {"OPTION_QUANTIZE": "awq"}},
2684-
sharding_config={"OverrideEnvironment": {"OPTION_QUANTIZE": "awq"}},
2685-
),
2686-
)
2687-
2688-
@patch.object(ModelBuilder, "_get_serve_setting", autospec=True)
2689-
def test_optimize_exclusive_sharding_args(self, mock_get_serve_setting):
2690-
mock_sagemaker_session = Mock()
2691-
model_builder = ModelBuilder(
2692-
model="meta-textgeneration-llama-3-70b",
2693-
sagemaker_session=mock_sagemaker_session,
2694-
)
2695-
2696-
self.assertRaisesRegex(
2697-
ValueError,
2698-
"OPTION_TENSOR_PARALLEL_DEGREE is required environment variable with Sharding config.",
2699-
lambda: model_builder.optimize(
2700-
sharding_config={"OverrideEnvironment": {"OPTION_QUANTIZE": "awq"}},
2701-
),
2702-
)
2703-
27042670
@patch.object(ModelBuilder, "_prepare_for_mode")
27052671
@patch.object(ModelBuilder, "_get_serve_setting", autospec=True)
27062672
def test_optimize_for_hf_with_custom_s3_path(

tests/unit/sagemaker/serve/utils/test_optimize_utils.py

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def test_is_s3_uri(s3_uri, expected):
261261

262262

263263
@pytest.mark.parametrize(
264-
"quantization_config, compilation_config, sharding_config, expected_config, expected_env",
264+
"quantization_config, compilation_config, expected_config, expected_env",
265265
[
266266
(
267267
None,
@@ -270,7 +270,6 @@ def test_is_s3_uri(s3_uri, expected):
270270
"OPTION_TENSOR_PARALLEL_DEGREE": "2",
271271
}
272272
},
273-
None,
274273
{
275274
"ModelCompilationConfig": {
276275
"OverrideEnvironment": {
@@ -289,7 +288,6 @@ def test_is_s3_uri(s3_uri, expected):
289288
}
290289
},
291290
None,
292-
None,
293291
{
294292
"ModelQuantizationConfig": {
295293
"OverrideEnvironment": {
@@ -301,26 +299,7 @@ def test_is_s3_uri(s3_uri, expected):
301299
"OPTION_TENSOR_PARALLEL_DEGREE": "2",
302300
},
303301
),
304-
(
305-
None,
306-
None,
307-
{
308-
"OverrideEnvironment": {
309-
"OPTION_TENSOR_PARALLEL_DEGREE": "2",
310-
}
311-
},
312-
{
313-
"ModelShardingConfig": {
314-
"OverrideEnvironment": {
315-
"OPTION_TENSOR_PARALLEL_DEGREE": "2",
316-
}
317-
},
318-
},
319-
{
320-
"OPTION_TENSOR_PARALLEL_DEGREE": "2",
321-
},
322-
),
323-
(None, None, None, None, None),
302+
(None, None, None, None),
324303
],
325304
)
326305
def test_extract_optimization_config_and_env(

0 commit comments

Comments
 (0)