Skip to content

Commit 3f0edfa

Browse files
revert md default params
1 parent 7bc0b35 commit 3f0edfa

File tree

2 files changed

+5
-23
lines changed

2 files changed

+5
-23
lines changed

ads/aqua/modeldeployment/deployment.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def get_deployment_default_params(
527527
self,
528528
model_id: str,
529529
instance_shape: str,
530-
) -> Dict:
530+
) -> List[str]:
531531
"""Gets the default params set in the deployment configs for the given model and instance shape.
532532
533533
Parameters
@@ -546,8 +546,6 @@ def get_deployment_default_params(
546546
547547
"""
548548
default_params = []
549-
container_type = UNKNOWN
550-
551549
model = DataScienceModel.from_id(model_id)
552550
try:
553551
container_type_key = model.custom_metadata_list.get(
@@ -572,12 +570,10 @@ def get_deployment_default_params(
572570
params = config_parameters.get(
573571
InferenceContainerParamType.PARAM_TYPE_VLLM, UNKNOWN
574572
)
575-
container_type = InferenceContainerType.CONTAINER_TYPE_VLLM
576573
elif InferenceContainerType.CONTAINER_TYPE_TGI in container_type_key:
577574
params = config_parameters.get(
578575
InferenceContainerParamType.PARAM_TYPE_TGI, UNKNOWN
579576
)
580-
container_type = InferenceContainerType.CONTAINER_TYPE_TGI
581577
else:
582578
params = UNKNOWN
583579
logger.debug(
@@ -588,10 +584,7 @@ def get_deployment_default_params(
588584
# account for param that can have --arg but no values, e.g. --trust-remote-code
589585
default_params.extend(get_params_list(params))
590586

591-
return dict(
592-
container_type=container_type,
593-
params=default_params,
594-
)
587+
return default_params
595588

596589
def validate_deployment_params(
597590
self, model_id: str, params: List[str] = None

tests/unitary/with_extras/aqua/test_deployment.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -423,38 +423,29 @@ def yaml_to_json(input_file):
423423
[
424424
(
425425
"VLLM_PARAMS",
426-
"vllm",
427426
"odsc-vllm-serving",
428427
["--max-model-len 4096", "--seed 42", "--trust-remote-code"],
429428
),
430429
(
431430
"VLLM_PARAMS",
432-
"vllm",
433431
"odsc-vllm-serving",
434432
[],
435433
),
436434
(
437435
"TGI_PARAMS",
438-
"tgi",
439436
"odsc-tgi-serving",
440437
["--sharded true", "--trust-remote-code"],
441438
),
442439
(
443440
"CUSTOM_PARAMS",
444-
"",
445441
"custom-container-key",
446442
["--max-model-len 4096", "--seed 42", "--trust-remote-code"],
447443
),
448444
]
449445
)
450446
@patch("ads.model.datascience_model.DataScienceModel.from_id")
451447
def test_get_deployment_default_params(
452-
self,
453-
container_params_field,
454-
container_type,
455-
container_type_key,
456-
params,
457-
mock_from_id,
448+
self, container_params_field, container_type_key, params, mock_from_id
458449
):
459450
"""Test for fetching config details for a given deployment."""
460451

@@ -480,12 +471,10 @@ def test_get_deployment_default_params(
480471
result = self.app.get_deployment_default_params(
481472
TestDataset.MODEL_ID, TestDataset.DEPLOYMENT_SHAPE_NAME
482473
)
483-
484-
assert result["container_type"] == container_type
485474
if container_params_field == "CUSTOM_PARAMS":
486-
assert result["params"] == []
475+
assert result == []
487476
else:
488-
assert result["params"] == params
477+
assert result == params
489478

490479
@parameterized.expand(
491480
[

0 commit comments

Comments
 (0)