2424 AquaModel ,
2525 ModelValidationResult ,
2626)
27+ from ads .aqua .common .utils import get_hf_model_info
2728import ads .common
2829import ads .common .oci_client
2930import ads .config
@@ -49,7 +50,7 @@ def mock_auth():
4950 yield mock_default_signer
5051
5152
52- @pytest .fixture (autouse = True , scope = "class " )
53+ @pytest .fixture (autouse = True , scope = "function " )
5354def mock_get_container_config ():
5455 with patch ("ads.aqua.ui.get_container_config" ) as mock_config :
5556 with open (
@@ -266,6 +267,7 @@ def teardown_method(self):
266267 self .create_signer_patch .stop ()
267268 self .validate_config_patch .stop ()
268269 self .create_client_patch .stop ()
270+ get_hf_model_info .cache_clear ()
269271
270272 @classmethod
271273 def setup_class (cls ):
@@ -933,7 +935,7 @@ def test_import_model_with_missing_config(
933935 app .list = MagicMock (return_value = [])
934936
935937 if download_from_hf :
936- with pytest .raises (AquaRuntimeError ):
938+ with pytest .raises (AquaValueError ):
937939 mock_get_hf_model_info .return_value .siblings = []
938940 with tempfile .TemporaryDirectory () as tmpdir :
939941 model : AquaModel = app .register (
@@ -1012,7 +1014,6 @@ def test_import_any_model_smc_container(
10121014 assert model .ready_to_deploy is True
10131015 assert model .ready_to_finetune is True
10141016
1015- @pytest .mark .skip (reason = "Skipping this test to check for unit test failure in GA" )
10161017 @pytest .mark .parametrize (
10171018 "download_from_hf" ,
10181019 [True , False ],
0 commit comments