24
24
AquaModel ,
25
25
ModelValidationResult ,
26
26
)
27
+ from ads .aqua .common .utils import get_hf_model_info
27
28
import ads .common
28
29
import ads .common .oci_client
29
30
import ads .config
@@ -49,7 +50,7 @@ def mock_auth():
49
50
yield mock_default_signer
50
51
51
52
52
- @pytest .fixture (autouse = True , scope = "class " )
53
+ @pytest .fixture (autouse = True , scope = "function " )
53
54
def mock_get_container_config ():
54
55
with patch ("ads.aqua.ui.get_container_config" ) as mock_config :
55
56
with open (
@@ -266,6 +267,7 @@ def teardown_method(self):
266
267
self .create_signer_patch .stop ()
267
268
self .validate_config_patch .stop ()
268
269
self .create_client_patch .stop ()
270
+ get_hf_model_info .cache_clear ()
269
271
270
272
@classmethod
271
273
def setup_class (cls ):
@@ -933,7 +935,7 @@ def test_import_model_with_missing_config(
933
935
app .list = MagicMock (return_value = [])
934
936
935
937
if download_from_hf :
936
- with pytest .raises (AquaRuntimeError ):
938
+ with pytest .raises (AquaValueError ):
937
939
mock_get_hf_model_info .return_value .siblings = []
938
940
with tempfile .TemporaryDirectory () as tmpdir :
939
941
model : AquaModel = app .register (
@@ -1012,7 +1014,6 @@ def test_import_any_model_smc_container(
1012
1014
assert model .ready_to_deploy is True
1013
1015
assert model .ready_to_finetune is True
1014
1016
1015
- @pytest .mark .skip (reason = "Skipping this test to check for unit test failure in GA" )
1016
1017
@pytest .mark .parametrize (
1017
1018
"download_from_hf" ,
1018
1019
[True , False ],
0 commit comments