Skip to content

Commit b918ebc

Browse files
clear cache before after run
1 parent 168b4f8 commit b918ebc

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ads/aqua/common/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,9 +1101,9 @@ def generate_tei_cmd_var(os_path: str) -> List[str]:
11011101

11021102
cmd_prefix = "--"
11031103
cmd_var = [
1104-
cmd_prefix + TextEmbeddingInferenceContainerParams.MODEL_ID,
1104+
f"{cmd_prefix}{TextEmbeddingInferenceContainerParams.MODEL_ID}",
11051105
f"{AQUA_MODEL_DEPLOYMENT_FOLDER}{ObjectStorageDetails.from_path(os_path.rstrip('/')).filepath}/",
1106-
cmd_prefix + TextEmbeddingInferenceContainerParams.PORT,
1106+
f"{cmd_prefix}{TextEmbeddingInferenceContainerParams.PORT}",
11071107
TEI_CONTAINER_DEFAULT_HOST,
11081108
]
11091109

tests/unitary/with_extras/aqua/test_model.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
AquaModel,
2525
ModelValidationResult,
2626
)
27+
from ads.aqua.common.utils import get_hf_model_info
2728
import ads.common
2829
import ads.common.oci_client
2930
import 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")
5354
def 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

Comments
 (0)