@@ -487,7 +487,7 @@ class TestDataset:
487487 "model_name" : "test_model_1" ,
488488 "model_task" : "text_embedding" ,
489489 "artifact_location" : "test_location_1" ,
490- "fine_tune_weights_location" : None
490+ "fine_tune_weights_location" : None ,
491491 },
492492 {
493493 "env_var" : {},
@@ -496,7 +496,7 @@ class TestDataset:
496496 "model_name" : "test_model_2" ,
497497 "model_task" : "image_text_to_text" ,
498498 "artifact_location" : "test_location_2" ,
499- "fine_tune_weights_location" : None
499+ "fine_tune_weights_location" : None ,
500500 },
501501 {
502502 "env_var" : {},
@@ -505,7 +505,7 @@ 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>"
508+ "fine_tune_weights_location" : "oci://test_bucket@test_namespace/models/ft-models/meta-llama-3b/ocid1.datasciencejob.oc1.iad.<ocid>" ,
509509 },
510510 ],
511511 "model_id" : "ocid1.datasciencemodel.oc1.<region>.<OCID>" ,
@@ -972,7 +972,7 @@ class TestDataset:
972972 "model_name" : "model_one" ,
973973 "model_task" : "text_embedding" ,
974974 "artifact_location" : "artifact_location_one" ,
975- "fine_tune_weights_location" : None
975+ "fine_tune_weights_location" : None ,
976976 },
977977 {
978978 "env_var" : {"--test_key_two" : "test_value_two" },
@@ -981,7 +981,7 @@ class TestDataset:
981981 "model_name" : "model_two" ,
982982 "model_task" : "image_text_to_text" ,
983983 "artifact_location" : "artifact_location_two" ,
984- "fine_tune_weights_location" : None
984+ "fine_tune_weights_location" : None ,
985985 },
986986 {
987987 "env_var" : {"--test_key_three" : "test_value_three" },
@@ -990,7 +990,7 @@ class TestDataset:
990990 "model_name" : "model_three" ,
991991 "model_task" : "code_synthesis" ,
992992 "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>" ,
994994 },
995995 ]
996996
@@ -1817,7 +1817,7 @@ def test_create_deployment_for_multi_model(
18171817 model_task = "code_synthesis" ,
18181818 gpu_count = 2 ,
18191819 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>" ,
18211821 )
18221822
18231823 result = self .app .create (
@@ -2283,36 +2283,3 @@ def test_validate_multimodel_deployment_feasibility_positive_single(
22832283 total_gpus ,
22842284 "test_data/deployment/aqua_summary_multi_model_single.json" ,
22852285 )
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