|
45 | 45 | ModelDeploymentConfigSummary, |
46 | 46 | ModelParams, |
47 | 47 | ) |
| 48 | +from ads.aqua.model.enums import MultiModelSupportedTaskType |
48 | 49 | from ads.aqua.modeldeployment.utils import MultiModelDeploymentConfigLoader |
49 | 50 | from ads.model.datascience_model import DataScienceModel |
50 | 51 | from ads.model.deployment.model_deployment import ModelDeployment |
@@ -276,7 +277,7 @@ class TestDataset: |
276 | 277 | "environment_configuration_type": "OCIR_CONTAINER", |
277 | 278 | "environment_variables": { |
278 | 279 | "MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions", |
279 | | - "MULTI_MODEL_CONFIG": '{ "models": [{ "params": "--served-model-name model_one --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_one/5be6479/artifact/", "model_task": "embedding"}, {"params": "--served-model-name model_two --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_two/83e9aa1/artifact/"}, {"params": "--served-model-name model_three --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_three/83e9aa1/artifact/"}]}', |
| 280 | + "MULTI_MODEL_CONFIG": '{ "models": [{ "params": "--served-model-name model_one --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_one/5be6479/artifact/", "model_task": "text_embedding"}, {"params": "--served-model-name model_two --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_two/83e9aa1/artifact/", "model_task": "image_text_to_text"}, {"params": "--served-model-name model_three --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_three/83e9aa1/artifact/", "model_task": "code_synthesis"}]}', |
280 | 281 | }, |
281 | 282 | "health_check_port": 8080, |
282 | 283 | "image": "dsmc://image-name:1.0.0.0", |
@@ -486,30 +487,30 @@ class TestDataset: |
486 | 487 | "gpu_count": 2, |
487 | 488 | "model_id": "test_model_id_1", |
488 | 489 | "model_name": "test_model_1", |
489 | | - "model_task": "embedding", |
| 490 | + "model_task": "text_embedding", |
490 | 491 | "artifact_location": "test_location_1", |
491 | 492 | }, |
492 | 493 | { |
493 | 494 | "env_var": {}, |
494 | 495 | "gpu_count": 2, |
495 | 496 | "model_id": "test_model_id_2", |
496 | 497 | "model_name": "test_model_2", |
497 | | - "model_task": None, |
| 498 | + "model_task": "image_text_to_text", |
498 | 499 | "artifact_location": "test_location_2", |
499 | 500 | }, |
500 | 501 | { |
501 | 502 | "env_var": {}, |
502 | 503 | "gpu_count": 2, |
503 | 504 | "model_id": "test_model_id_3", |
504 | 505 | "model_name": "test_model_3", |
505 | | - "model_task": None, |
| 506 | + "model_task": "code_synthesis", |
506 | 507 | "artifact_location": "test_location_3", |
507 | 508 | }, |
508 | 509 | ], |
509 | 510 | "model_id": "ocid1.datasciencemodel.oc1.<region>.<OCID>", |
510 | 511 | "environment_variables": { |
511 | 512 | "MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions", |
512 | | - "MULTI_MODEL_CONFIG": '{ "models": [{ "params": "--served-model-name model_one --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_one/5be6479/artifact/", "model_task": "embedding"}, {"params": "--served-model-name model_two --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_two/83e9aa1/artifact/"}, {"params": "--served-model-name model_three --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_three/83e9aa1/artifact/"}]}', |
| 513 | + "MULTI_MODEL_CONFIG": '{ "models": [{ "params": "--served-model-name model_one --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_one/5be6479/artifact/", "model_task": "text_embedding"}, {"params": "--served-model-name model_two --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_two/83e9aa1/artifact/", "model_task": "image_text_to_text"}, {"params": "--served-model-name model_three --tensor-parallel-size 1 --max-model-len 2096", "model_path": "models/model_three/83e9aa1/artifact/", "model_task": "code_synthesis"}]}', |
513 | 514 | }, |
514 | 515 | "cmd": [], |
515 | 516 | "console_link": "https://cloud.oracle.com/data-science/model-deployments/ocid1.datasciencemodeldeployment.oc1.<region>.<MD_OCID>?region=region-name", |
@@ -968,23 +969,23 @@ class TestDataset: |
968 | 969 | "gpu_count": 1, |
969 | 970 | "model_id": "ocid1.compartment.oc1..<OCID>", |
970 | 971 | "model_name": "model_one", |
971 | | - "model_task": "embedding", |
| 972 | + "model_task": "text_embedding", |
972 | 973 | "artifact_location": "artifact_location_one", |
973 | 974 | }, |
974 | 975 | { |
975 | 976 | "env_var": {"--test_key_two": "test_value_two"}, |
976 | 977 | "gpu_count": 1, |
977 | 978 | "model_id": "ocid1.compartment.oc1..<OCID>", |
978 | 979 | "model_name": "model_two", |
979 | | - "model_task": None, |
| 980 | + "model_task": "image_text_to_text", |
980 | 981 | "artifact_location": "artifact_location_two", |
981 | 982 | }, |
982 | 983 | { |
983 | 984 | "env_var": {"--test_key_three": "test_value_three"}, |
984 | 985 | "gpu_count": 1, |
985 | 986 | "model_id": "ocid1.compartment.oc1..<OCID>", |
986 | 987 | "model_name": "model_three", |
987 | | - "model_task": None, |
| 988 | + "model_task": "code_synthesis", |
988 | 989 | "artifact_location": "artifact_location_three", |
989 | 990 | }, |
990 | 991 | ] |
@@ -1793,23 +1794,23 @@ def test_create_deployment_for_multi_model( |
1793 | 1794 | model_info_1 = AquaMultiModelRef( |
1794 | 1795 | model_id="test_model_id_1", |
1795 | 1796 | model_name="test_model_1", |
1796 | | - model_task="embedding", |
| 1797 | + model_task="text_embedding", |
1797 | 1798 | gpu_count=2, |
1798 | 1799 | artifact_location="test_location_1", |
1799 | 1800 | ) |
1800 | 1801 |
|
1801 | 1802 | model_info_2 = AquaMultiModelRef( |
1802 | 1803 | model_id="test_model_id_2", |
1803 | 1804 | model_name="test_model_2", |
1804 | | - model_task=None, |
| 1805 | + model_task="image_text_to_text", |
1805 | 1806 | gpu_count=2, |
1806 | 1807 | artifact_location="test_location_2", |
1807 | 1808 | ) |
1808 | 1809 |
|
1809 | 1810 | model_info_3 = AquaMultiModelRef( |
1810 | 1811 | model_id="test_model_id_3", |
1811 | 1812 | model_name="test_model_3", |
1812 | | - model_task=None, |
| 1813 | + model_task="code_synthesis", |
1813 | 1814 | gpu_count=2, |
1814 | 1815 | artifact_location="test_location_3", |
1815 | 1816 | ) |
|
0 commit comments