19
19
)
20
20
from parameterized import parameterized
21
21
22
+ import ads .aqua .modeldeployment .deployment
23
+ import ads .config
24
+ from ads .aqua .app import AquaApp
22
25
from ads .aqua .common .entities import (
23
26
AquaMultiModelRef ,
24
27
ComputeShapeSummary ,
25
28
ModelConfigResult ,
26
29
)
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
32
30
from ads .aqua .common .enums import Tags
33
31
from ads .aqua .common .errors import AquaRuntimeError , AquaValueError
34
32
from ads .aqua .config .container_config import (
35
- AquaContainerConfigItem ,
36
33
AquaContainerConfig ,
34
+ AquaContainerConfigItem ,
37
35
)
36
+ from ads .aqua .model .enums import MultiModelSupportedTaskType
38
37
from ads .aqua .modeldeployment import AquaDeploymentApp , MDInferenceResponse
39
38
from ads .aqua .modeldeployment .entities import (
40
39
AquaDeployment ,
45
44
ModelDeploymentConfigSummary ,
46
45
ModelParams ,
47
46
)
48
- from ads .aqua .model .enums import MultiModelSupportedTaskType
49
47
from ads .aqua .modeldeployment .utils import MultiModelDeploymentConfigLoader
50
48
from ads .model .datascience_model import DataScienceModel
51
49
from ads .model .deployment .model_deployment import ModelDeployment
@@ -277,7 +275,7 @@ class TestDataset:
277
275
"environment_configuration_type" : "OCIR_CONTAINER" ,
278
276
"environment_variables" : {
279
277
"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>" }]}' ,
281
279
},
282
280
"health_check_port" : 8080 ,
283
281
"image" : "dsmc://image-name:1.0.0.0" ,
@@ -489,6 +487,7 @@ class TestDataset:
489
487
"model_name" : "test_model_1" ,
490
488
"model_task" : "text_embedding" ,
491
489
"artifact_location" : "test_location_1" ,
490
+ "fine_tune_weights_location" : None
492
491
},
493
492
{
494
493
"env_var" : {},
@@ -497,6 +496,7 @@ class TestDataset:
497
496
"model_name" : "test_model_2" ,
498
497
"model_task" : "image_text_to_text" ,
499
498
"artifact_location" : "test_location_2" ,
499
+ "fine_tune_weights_location" : None
500
500
},
501
501
{
502
502
"env_var" : {},
@@ -505,12 +505,13 @@ class TestDataset:
505
505
"model_name" : "test_model_3" ,
506
506
"model_task" : "code_synthesis" ,
507
507
"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>"
508
509
},
509
510
],
510
511
"model_id" : "ocid1.datasciencemodel.oc1.<region>.<OCID>" ,
511
512
"environment_variables" : {
512
513
"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>" }]}' ,
514
515
},
515
516
"cmd" : [],
516
517
"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:
971
972
"model_name" : "model_one" ,
972
973
"model_task" : "text_embedding" ,
973
974
"artifact_location" : "artifact_location_one" ,
975
+ "fine_tune_weights_location" : None
974
976
},
975
977
{
976
978
"env_var" : {"--test_key_two" : "test_value_two" },
@@ -979,6 +981,7 @@ class TestDataset:
979
981
"model_name" : "model_two" ,
980
982
"model_task" : "image_text_to_text" ,
981
983
"artifact_location" : "artifact_location_two" ,
984
+ "fine_tune_weights_location" : None
982
985
},
983
986
{
984
987
"env_var" : {"--test_key_three" : "test_value_three" },
@@ -987,6 +990,7 @@ class TestDataset:
987
990
"model_name" : "model_three" ,
988
991
"model_task" : "code_synthesis" ,
989
992
"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>"
990
994
},
991
995
]
992
996
@@ -1813,6 +1817,7 @@ def test_create_deployment_for_multi_model(
1813
1817
model_task = "code_synthesis" ,
1814
1818
gpu_count = 2 ,
1815
1819
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>"
1816
1821
)
1817
1822
1818
1823
result = self .app .create (
0 commit comments