1919)
2020from parameterized import parameterized
2121
22+ import ads .aqua .modeldeployment .deployment
23+ import ads .config
24+ from ads .aqua .app import AquaApp
2225from ads .aqua .common .entities import (
2326 AquaMultiModelRef ,
2427 ComputeShapeSummary ,
2528 ModelConfigResult ,
2629)
27- from ads .aqua .app import AquaApp
28- from ads .aqua .common .entities import ModelConfigResult
29- import ads .aqua .modeldeployment .deployment
30- import ads .config
31- from ads .aqua .common .entities import AquaMultiModelRef
3230from ads .aqua .common .enums import Tags
3331from ads .aqua .common .errors import AquaRuntimeError , AquaValueError
3432from ads .aqua .config .container_config import (
35- AquaContainerConfigItem ,
3633 AquaContainerConfig ,
34+ AquaContainerConfigItem ,
3735)
36+ from ads .aqua .model .enums import MultiModelSupportedTaskType
3837from ads .aqua .modeldeployment import AquaDeploymentApp , MDInferenceResponse
3938from ads .aqua .modeldeployment .entities import (
4039 AquaDeployment ,
4544 ModelDeploymentConfigSummary ,
4645 ModelParams ,
4746)
48- from ads .aqua .model .enums import MultiModelSupportedTaskType
4947from ads .aqua .modeldeployment .utils import MultiModelDeploymentConfigLoader
5048from ads .model .datascience_model import DataScienceModel
5149from ads .model .deployment .model_deployment import ModelDeployment
@@ -277,7 +275,7 @@ class TestDataset:
277275 "environment_configuration_type" : "OCIR_CONTAINER" ,
278276 "environment_variables" : {
279277 "MODEL_DEPLOY_PREDICT_ENDPOINT" : "/v1/completions" ,
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"}]}' ,
278+ "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", "fine_tune_weights_location": "oci://test_bucket@test_namespace/models/ft-models/meta-llama-3b/ocid1.datasciencejob.oc1.iad.<ocid>" }]}' ,
281279 },
282280 "health_check_port" : 8080 ,
283281 "image" : "dsmc://image-name:1.0.0.0" ,
@@ -489,6 +487,7 @@ class TestDataset:
489487 "model_name" : "test_model_1" ,
490488 "model_task" : "text_embedding" ,
491489 "artifact_location" : "test_location_1" ,
490+ "fine_tune_weights_location" : None
492491 },
493492 {
494493 "env_var" : {},
@@ -497,6 +496,7 @@ class TestDataset:
497496 "model_name" : "test_model_2" ,
498497 "model_task" : "image_text_to_text" ,
499498 "artifact_location" : "test_location_2" ,
499+ "fine_tune_weights_location" : None
500500 },
501501 {
502502 "env_var" : {},
@@ -505,12 +505,13 @@ class TestDataset:
505505 "model_name" : "test_model_3" ,
506506 "model_task" : "code_synthesis" ,
507507 "artifact_location" : "test_location_3" ,
508+ "fine_tune_weights_location" : "oci://test_bucket@test_namespace/models/ft-models/meta-llama-3b/ocid1.datasciencejob.oc1.iad.<ocid>"
508509 },
509510 ],
510511 "model_id" : "ocid1.datasciencemodel.oc1.<region>.<OCID>" ,
511512 "environment_variables" : {
512513 "MODEL_DEPLOY_PREDICT_ENDPOINT" : "/v1/completions" ,
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"}]}' ,
514+ "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", "fine_tune_weights_location": "oci://test_bucket@test_namespace/models/ft-models/meta-llama-3b/ocid1.datasciencejob.oc1.iad.<ocid>" }]}' ,
514515 },
515516 "cmd" : [],
516517 "console_link" : "https://cloud.oracle.com/data-science/model-deployments/ocid1.datasciencemodeldeployment.oc1.<region>.<MD_OCID>?region=region-name" ,
@@ -971,6 +972,7 @@ class TestDataset:
971972 "model_name" : "model_one" ,
972973 "model_task" : "text_embedding" ,
973974 "artifact_location" : "artifact_location_one" ,
975+ "fine_tune_weights_location" : None
974976 },
975977 {
976978 "env_var" : {"--test_key_two" : "test_value_two" },
@@ -979,6 +981,7 @@ class TestDataset:
979981 "model_name" : "model_two" ,
980982 "model_task" : "image_text_to_text" ,
981983 "artifact_location" : "artifact_location_two" ,
984+ "fine_tune_weights_location" : None
982985 },
983986 {
984987 "env_var" : {"--test_key_three" : "test_value_three" },
@@ -987,6 +990,7 @@ class TestDataset:
987990 "model_name" : "model_three" ,
988991 "model_task" : "code_synthesis" ,
989992 "artifact_location" : "artifact_location_three" ,
993+ "fine_tune_weights_location" : "oci://test_bucket@test_namespace/models/ft-models/meta-llama-3b/ocid1.datasciencejob.oc1.iad.<ocid>"
990994 },
991995 ]
992996
@@ -1813,6 +1817,7 @@ def test_create_deployment_for_multi_model(
18131817 model_task = "code_synthesis" ,
18141818 gpu_count = 2 ,
18151819 artifact_location = "test_location_3" ,
1820+ fine_tune_weights_location = "oci://test_bucket@test_namespace/models/ft-models/meta-llama-3b/ocid1.datasciencejob.oc1.iad.<ocid>"
18161821 )
18171822
18181823 result = self .app .create (
0 commit comments