File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -336,8 +336,7 @@ def test_get_deployment_missing_tags(self):
336
336
337
337
self .app .get (model_deployment_id = TestDataset .MODEL_DEPLOYMENT_ID )
338
338
339
- @patch ("ads.aqua.modeldeployment.deployment.load_config" )
340
- def test_get_deployment_config (self , mock_load_config ):
339
+ def test_get_deployment_config (self ):
341
340
"""Test for fetching config details for a given deployment."""
342
341
343
342
config_json = os .path .join (
@@ -351,9 +350,8 @@ def test_get_deployment_config(self, mock_load_config):
351
350
assert result == config
352
351
353
352
self .app .get_config = MagicMock (return_value = None )
354
- mock_load_config .return_value = config
355
353
result = self .app .get_deployment_config (TestDataset .MODEL_ID )
356
- assert result == config
354
+ assert result == None
357
355
358
356
@patch ("ads.aqua.modeldeployment.deployment.get_container_config" )
359
357
@patch ("ads.aqua.model.AquaModelApp.create" )
Original file line number Diff line number Diff line change 26
26
from ads .model .datascience_model import DataScienceModel
27
27
from ads .model .model_metadata import ModelCustomMetadata
28
28
from ads .aqua .common .errors import AquaValueError
29
- from ads .aqua .config .config import get_finetuning_config_defaults
30
29
31
30
32
31
class FineTuningTestCase (TestCase ):
@@ -246,10 +245,6 @@ def test_get_finetuning_config(self):
246
245
result = self .app .get_finetuning_config (model_id = "test-model-id" )
247
246
assert result == config
248
247
249
- self .app .get_config = MagicMock (return_value = None )
250
- result = self .app .get_finetuning_config (model_id = "test-model-id" )
251
- assert result == get_finetuning_config_defaults ()
252
-
253
248
def test_get_finetuning_default_params (self ):
254
249
"""Test for fetching finetuning config params for a given model."""
255
250
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class TestDataset:
22
22
USER_COMPARTMENT_ID = "ocid1.compartment.oc1..<USER_COMPARTMENT_OCID>"
23
23
USER_PROJECT_ID = "ocid1.datascienceproject.oc1.iad.<USER_PROJECT_OCID>"
24
24
DEPLOYMENT_SHAPE_NAME = "VM.GPU.A10.1"
25
+ LIMIT_NAME = "ds-gpu-a10-count"
25
26
26
27
27
28
class TestAquaUIHandler (unittest .TestCase ):
@@ -153,14 +154,15 @@ def test_list_subnets(self, mock_list_subnets):
153
154
def test_get_shape_availability (self , mock_get_shape_availability ):
154
155
"""Test get shape availability."""
155
156
self .ui_handler .request .path = "aqua/shapes/limit"
156
- args = {"instance_shape" : TestDataset .DEPLOYMENT_SHAPE_NAME }
157
+ args = {"instance_shape" : TestDataset .DEPLOYMENT_SHAPE_NAME , "limit_name" : TestDataset . LIMIT_NAME }
157
158
self .ui_handler .get_argument = MagicMock (
158
159
side_effect = lambda arg , default = None : args .get (arg , default )
159
160
)
160
161
self .ui_handler .get ()
161
162
mock_get_shape_availability .assert_called_with (
162
163
compartment_id = TestDataset .USER_COMPARTMENT_ID ,
163
164
instance_shape = TestDataset .DEPLOYMENT_SHAPE_NAME ,
165
+ limit_name = TestDataset .LIMIT_NAME
164
166
)
165
167
166
168
@patch ("ads.aqua.ui.AquaUIApp.is_bucket_versioned" )
You can’t perform that action at this time.
0 commit comments