Skip to content

Commit 155aa3d

Browse files
Merge branch 'main' into ODSC-66853/load_base_model_config_by_default
2 parents 7c17130 + 0cc2b58 commit 155aa3d

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
@@ -1224,22 +1224,22 @@ def test_import_model_with_input_tags(
12241224
"model": "oracle/oracle-1it",
12251225
"inference_container": "odsc-vllm-serving",
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 --inference_container odsc-vllm-serving",
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 --inference_container odsc-vllm-serving",
12281228
),
12291229
(
12301230
{
12311231
"os_path": "oci://aqua-bkt@aqua-ns/path",
12321232
"model": "ocid1.datasciencemodel.oc1.iad.<OCID>",
12331233
},
1234-
"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",
1234+
"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",
12351235
),
12361236
(
12371237
{
12381238
"os_path": "oci://aqua-bkt@aqua-ns/path",
12391239
"model": "oracle/oracle-1it",
12401240
"download_from_hf": False,
12411241
},
1242-
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf False --cleanup_model_cache True",
1242+
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf False --cleanup_model_cache False",
12431243
),
12441244
(
12451245
{
@@ -1248,7 +1248,7 @@ def test_import_model_with_input_tags(
12481248
"download_from_hf": True,
12491249
"model_file": "test_model_file",
12501250
},
1251-
"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",
1251+
"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",
12521252
),
12531253
(
12541254
{
@@ -1257,7 +1257,7 @@ def test_import_model_with_input_tags(
12571257
"inference_container": "odsc-tei-serving",
12581258
"inference_container_uri": "<region>.ocir.io/<your_tenancy>/<your_image>",
12591259
},
1260-
"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>",
1260+
"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>",
12611261
),
12621262
(
12631263
{
@@ -1268,7 +1268,7 @@ def test_import_model_with_input_tags(
12681268
"defined_tags": {"dtag1": "dvalue1", "dtag2": "dvalue2"},
12691269
},
12701270
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path "
1271-
"--download_from_hf True --cleanup_model_cache True --inference_container odsc-vllm-serving --freeform_tags "
1271+
"--download_from_hf True --cleanup_model_cache False --inference_container odsc-vllm-serving --freeform_tags "
12721272
'{"ftag1": "fvalue1", "ftag2": "fvalue2"} --defined_tags {"dtag1": "dvalue1", "dtag2": "dvalue2"}',
12731273
),
12741274
(
@@ -1277,6 +1277,7 @@ def test_import_model_with_input_tags(
12771277
"model": "oracle/oracle-1it",
12781278
"inference_container": "odsc-vllm-serving",
12791279
"ignore_model_artifact_check": True,
1280+
"cleanup_model_cache": True,
12801281
},
12811282
"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",
12821283
),

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)