Skip to content

Commit a2adbf6

Browse files
committed
Fix unit tests
1 parent 6689440 commit a2adbf6

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

tests/unitary/with_extras/aqua/test_model.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def test_create_multimodel(
367367
mock_model.display_name = "test_display_name"
368368
mock_model.description = "test_description"
369369
mock_model.freeform_tags = {
370-
"OCI_AQUA": "ACTIVE",
370+
# "OCI_AQUA": "ACTIVE",
371371
}
372372
mock_model.id = "mock_model_id"
373373
mock_model.artifact = "mock_artifact_path"
@@ -391,10 +391,7 @@ def test_create_multimodel(
391391
env_var={"params": "--trust-remote-code --max-model-len 32000"},
392392
)
393393

394-
with pytest.raises(
395-
AquaValueError,
396-
match="Invalid selected model test_display_name. Currently only service models are supported for multi model deployment.",
397-
):
394+
with pytest.raises(AquaValueError):
398395
model = self.app.create_multi(
399396
models=[model_info_1, model_info_2],
400397
project_id="test_project_id",
@@ -403,10 +400,7 @@ def test_create_multimodel(
403400

404401
mock_model.freeform_tags["aqua_service_model"] = TestDataset.SERVICE_MODEL_ID
405402

406-
with pytest.raises(
407-
AquaValueError,
408-
match="Invalid or missing task tag for selected model test_display_name. Currently only text-generation models are support for multi model deployment.",
409-
):
403+
with pytest.raises(AquaValueError):
410404
model = self.app.create_multi(
411405
models=[model_info_1, model_info_2],
412406
project_id="test_project_id",
@@ -415,10 +409,7 @@ def test_create_multimodel(
415409

416410
mock_model.freeform_tags["task"] = "text-generation"
417411

418-
with pytest.raises(
419-
AquaValueError,
420-
match="Unsupported deployment container 'odsc-tgi-serving' for model 'mock_model_id'. Only 'odsc-vllm-serving' is supported for multi-model deployments.",
421-
):
412+
with pytest.raises(AquaValueError):
422413
model = self.app.create_multi(
423414
models=[model_info_1, model_info_2],
424415
project_id="test_project_id",
@@ -449,7 +440,7 @@ def test_create_multimodel(
449440
mock_from_id.return_value = mock_model
450441
mock_create.return_value = mock_model
451442

452-
assert model.freeform_tags == {"OCI_AQUA": "active", "aqua_multimodel": "true"}
443+
assert model.freeform_tags == {"aqua_multimodel": "true"}
453444
assert model.custom_metadata_list.get("model_group_count").value == "2"
454445
assert (
455446
model.custom_metadata_list.get("deployment-container").value

0 commit comments

Comments
 (0)