@@ -487,7 +487,7 @@ class TestDataset:
487
487
"model_name" : "test_model_1" ,
488
488
"model_task" : "text_embedding" ,
489
489
"artifact_location" : "test_location_1" ,
490
- "fine_tune_weights_location" : None
490
+ "fine_tune_weights_location" : None ,
491
491
},
492
492
{
493
493
"env_var" : {},
@@ -496,7 +496,7 @@ class TestDataset:
496
496
"model_name" : "test_model_2" ,
497
497
"model_task" : "image_text_to_text" ,
498
498
"artifact_location" : "test_location_2" ,
499
- "fine_tune_weights_location" : None
499
+ "fine_tune_weights_location" : None ,
500
500
},
501
501
{
502
502
"env_var" : {},
@@ -505,7 +505,7 @@ 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
+ "fine_tune_weights_location" : "oci://test_bucket@test_namespace/models/ft-models/meta-llama-3b/ocid1.datasciencejob.oc1.iad.<ocid>" ,
509
509
},
510
510
],
511
511
"model_id" : "ocid1.datasciencemodel.oc1.<region>.<OCID>" ,
@@ -972,7 +972,7 @@ class TestDataset:
972
972
"model_name" : "model_one" ,
973
973
"model_task" : "text_embedding" ,
974
974
"artifact_location" : "artifact_location_one" ,
975
- "fine_tune_weights_location" : None
975
+ "fine_tune_weights_location" : None ,
976
976
},
977
977
{
978
978
"env_var" : {"--test_key_two" : "test_value_two" },
@@ -981,7 +981,7 @@ class TestDataset:
981
981
"model_name" : "model_two" ,
982
982
"model_task" : "image_text_to_text" ,
983
983
"artifact_location" : "artifact_location_two" ,
984
- "fine_tune_weights_location" : None
984
+ "fine_tune_weights_location" : None ,
985
985
},
986
986
{
987
987
"env_var" : {"--test_key_three" : "test_value_three" },
@@ -990,7 +990,7 @@ class TestDataset:
990
990
"model_name" : "model_three" ,
991
991
"model_task" : "code_synthesis" ,
992
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>"
993
+ "fine_tune_weights_location" : "oci://test_bucket@test_namespace/models/ft-models/meta-llama-3b/ocid1.datasciencejob.oc1.iad.<ocid>" ,
994
994
},
995
995
]
996
996
@@ -1817,7 +1817,7 @@ def test_create_deployment_for_multi_model(
1817
1817
model_task = "code_synthesis" ,
1818
1818
gpu_count = 2 ,
1819
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>"
1820
+ fine_tune_weights_location = "oci://test_bucket@test_namespace/models/ft-models/meta-llama-3b/ocid1.datasciencejob.oc1.iad.<ocid>" ,
1821
1821
)
1822
1822
1823
1823
result = self .app .create (
@@ -2283,36 +2283,3 @@ def test_validate_multimodel_deployment_feasibility_positive_single(
2283
2283
total_gpus ,
2284
2284
"test_data/deployment/aqua_summary_multi_model_single.json" ,
2285
2285
)
2286
-
2287
-
2288
- class TestMDInferenceResponse (unittest .TestCase ):
2289
- def setUp (self ):
2290
- self .app = MDInferenceResponse ()
2291
-
2292
- @classmethod
2293
- def setUpClass (cls ):
2294
- cls .curr_dir = os .path .dirname (os .path .abspath (__file__ ))
2295
-
2296
- @classmethod
2297
- def tearDownClass (cls ):
2298
- cls .curr_dir = None
2299
-
2300
- @patch ("requests.post" )
2301
- def test_get_model_deployment_response (self , mock_post ):
2302
- """Test to check if model deployment response is returned correctly."""
2303
-
2304
- endpoint = TestDataset .MODEL_DEPLOYMENT_URL + "/predict"
2305
- self .app .prompt = "What is 1+1?"
2306
- self .app .model_params = ModelParams (** TestDataset .model_params )
2307
-
2308
- mock_response = MagicMock ()
2309
- response_json = os .path .join (
2310
- self .curr_dir , "test_data/deployment/aqua_deployment_response.json"
2311
- )
2312
- with open (response_json , "r" ) as _file :
2313
- mock_response .content = _file .read ()
2314
- mock_response .status_code = 200
2315
- mock_post .return_value = mock_response
2316
-
2317
- result = self .app .get_model_deployment_response (endpoint )
2318
- assert result ["choices" ][0 ]["text" ] == " The answer is 2"
0 commit comments