Skip to content

Commit a11f503

Browse files
switch cache delete default to false
1 parent 21ba00b commit a11f503

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

‎ads/aqua/extension/model_handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def post(self, *args, **kwargs): # noqa: ARG002
133133
)
134134
local_dir = input_data.get("local_dir")
135135
cleanup_model_cache = (
136-
str(input_data.get("cleanup_model_cache", "true")).lower() == "true"
136+
str(input_data.get("cleanup_model_cache", "false")).lower() == "true"
137137
)
138138
inference_container_uri = input_data.get("inference_container_uri")
139139
allow_patterns = input_data.get("allow_patterns")

‎ads/aqua/model/entities.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class ImportModelDetails(CLIBuilderMixin):
283283
os_path: str
284284
download_from_hf: Optional[bool] = True
285285
local_dir: Optional[str] = None
286-
cleanup_model_cache: Optional[bool] = True
286+
cleanup_model_cache: Optional[bool] = False
287287
inference_container: Optional[str] = None
288288
finetuning_container: Optional[str] = None
289289
compartment_id: Optional[str] = None

‎tests/unitary/with_extras/aqua/test_model.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1200,22 +1200,22 @@ def test_import_model_with_input_tags(
12001200
"model": "oracle/oracle-1it",
12011201
"inference_container": "odsc-vllm-serving",
12021202
},
1203-
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --cleanup_model_cache True --inference_container odsc-vllm-serving",
1203+
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --cleanup_model_cache False --inference_container odsc-vllm-serving",
12041204
),
12051205
(
12061206
{
12071207
"os_path": "oci://aqua-bkt@aqua-ns/path",
12081208
"model": "ocid1.datasciencemodel.oc1.iad.<OCID>",
12091209
},
1210-
"ads aqua model register --model ocid1.datasciencemodel.oc1.iad.<OCID> --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --cleanup_model_cache True",
1210+
"ads aqua model register --model ocid1.datasciencemodel.oc1.iad.<OCID> --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --cleanup_model_cache False",
12111211
),
12121212
(
12131213
{
12141214
"os_path": "oci://aqua-bkt@aqua-ns/path",
12151215
"model": "oracle/oracle-1it",
12161216
"download_from_hf": False,
12171217
},
1218-
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf False --cleanup_model_cache True",
1218+
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf False --cleanup_model_cache False",
12191219
),
12201220
(
12211221
{
@@ -1224,7 +1224,7 @@ def test_import_model_with_input_tags(
12241224
"download_from_hf": True,
12251225
"model_file": "test_model_file",
12261226
},
1227-
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --cleanup_model_cache True --model_file test_model_file",
1227+
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --cleanup_model_cache False --model_file test_model_file",
12281228
),
12291229
(
12301230
{
@@ -1233,7 +1233,7 @@ def test_import_model_with_input_tags(
12331233
"inference_container": "odsc-tei-serving",
12341234
"inference_container_uri": "<region>.ocir.io/<your_tenancy>/<your_image>",
12351235
},
1236-
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --cleanup_model_cache True --inference_container odsc-tei-serving --inference_container_uri <region>.ocir.io/<your_tenancy>/<your_image>",
1236+
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --cleanup_model_cache False --inference_container odsc-tei-serving --inference_container_uri <region>.ocir.io/<your_tenancy>/<your_image>",
12371237
),
12381238
(
12391239
{
@@ -1244,7 +1244,7 @@ def test_import_model_with_input_tags(
12441244
"defined_tags": {"dtag1": "dvalue1", "dtag2": "dvalue2"},
12451245
},
12461246
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path "
1247-
"--download_from_hf True --cleanup_model_cache True --inference_container odsc-vllm-serving --freeform_tags "
1247+
"--download_from_hf True --cleanup_model_cache False --inference_container odsc-vllm-serving --freeform_tags "
12481248
'{"ftag1": "fvalue1", "ftag2": "fvalue2"} --defined_tags {"dtag1": "dvalue1", "dtag2": "dvalue2"}',
12491249
),
12501250
],

‎tests/unitary/with_extras/aqua/test_model_handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def test_register(
214214
model_file=model_file,
215215
download_from_hf=download_from_hf,
216216
local_dir=None,
217-
cleanup_model_cache=True,
217+
cleanup_model_cache=False,
218218
inference_container_uri=inference_container_uri,
219219
allow_patterns=allow_patterns,
220220
ignore_patterns=ignore_patterns,

0 commit comments

Comments
 (0)