Skip to content

Commit d27e038

Browse files
Merge branch 'main' into ODSC-66852/watch_aqua_ft_job
2 parents 29266c8 + 0cc2b58 commit d27e038

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

ads/aqua/extension/model_handler.py

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,22 +1228,22 @@ def test_import_model_with_input_tags(
12281228
"model": "oracle/oracle-1it",
12291229
"inference_container": "odsc-vllm-serving",
12301230
},
1231-
"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",
1231+
"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",
12321232
),
12331233
(
12341234
{
12351235
"os_path": "oci://aqua-bkt@aqua-ns/path",
12361236
"model": "ocid1.datasciencemodel.oc1.iad.<OCID>",
12371237
},
1238-
"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",
1238+
"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",
12391239
),
12401240
(
12411241
{
12421242
"os_path": "oci://aqua-bkt@aqua-ns/path",
12431243
"model": "oracle/oracle-1it",
12441244
"download_from_hf": False,
12451245
},
1246-
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf False --cleanup_model_cache True",
1246+
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf False --cleanup_model_cache False",
12471247
),
12481248
(
12491249
{
@@ -1252,7 +1252,7 @@ def test_import_model_with_input_tags(
12521252
"download_from_hf": True,
12531253
"model_file": "test_model_file",
12541254
},
1255-
"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",
1255+
"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",
12561256
),
12571257
(
12581258
{
@@ -1261,7 +1261,7 @@ def test_import_model_with_input_tags(
12611261
"inference_container": "odsc-tei-serving",
12621262
"inference_container_uri": "<region>.ocir.io/<your_tenancy>/<your_image>",
12631263
},
1264-
"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>",
1264+
"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>",
12651265
),
12661266
(
12671267
{
@@ -1272,7 +1272,7 @@ def test_import_model_with_input_tags(
12721272
"defined_tags": {"dtag1": "dvalue1", "dtag2": "dvalue2"},
12731273
},
12741274
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path "
1275-
"--download_from_hf True --cleanup_model_cache True --inference_container odsc-vllm-serving --freeform_tags "
1275+
"--download_from_hf True --cleanup_model_cache False --inference_container odsc-vllm-serving --freeform_tags "
12761276
'{"ftag1": "fvalue1", "ftag2": "fvalue2"} --defined_tags {"dtag1": "dvalue1", "dtag2": "dvalue2"}',
12771277
),
12781278
(
@@ -1281,6 +1281,7 @@ def test_import_model_with_input_tags(
12811281
"model": "oracle/oracle-1it",
12821282
"inference_container": "odsc-vllm-serving",
12831283
"ignore_model_artifact_check": True,
1284+
"cleanup_model_cache": True,
12841285
},
12851286
"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 --ignore_model_artifact_check True",
12861287
),

tests/unitary/with_extras/aqua/test_model_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def test_register(
219219
model_file=model_file,
220220
download_from_hf=download_from_hf,
221221
local_dir=None,
222-
cleanup_model_cache=True,
222+
cleanup_model_cache=False,
223223
inference_container_uri=inference_container_uri,
224224
allow_patterns=allow_patterns,
225225
ignore_patterns=ignore_patterns,

0 commit comments

Comments
 (0)