@@ -653,7 +653,7 @@ def test_get_model_fine_tuned(
653
653
}
654
654
655
655
@pytest .mark .parametrize (
656
- ("artifact_location_set" , "download_from_hf" , "delete_from_local " ),
656
+ ("artifact_location_set" , "download_from_hf" , "cleanup_model_cache " ),
657
657
[
658
658
(True , True , True ),
659
659
(True , False , True ),
@@ -683,7 +683,7 @@ def test_import_verified_model(
683
683
mock_ocidsc_create ,
684
684
artifact_location_set ,
685
685
download_from_hf ,
686
- delete_from_local ,
686
+ cleanup_model_cache ,
687
687
mock_get_hf_model_info ,
688
688
mock_init_client ,
689
689
):
@@ -748,7 +748,7 @@ def test_import_verified_model(
748
748
os_path = os_path ,
749
749
local_dir = str (tmpdir ),
750
750
download_from_hf = True ,
751
- delete_from_local = delete_from_local ,
751
+ cleanup_model_cache = cleanup_model_cache ,
752
752
allow_patterns = ["*.json" ],
753
753
ignore_patterns = ["test.json" ],
754
754
)
@@ -763,7 +763,7 @@ def test_import_verified_model(
763
763
f"oci os object bulk-upload --src-dir { str (tmpdir )} /{ model_name } --prefix prefix/path/{ model_name } / -bn aqua-bkt -ns aqua-ns --auth api_key --profile DEFAULT --no-overwrite --exclude { HF_METADATA_FOLDER } *"
764
764
)
765
765
)
766
- if delete_from_local :
766
+ if cleanup_model_cache :
767
767
cache_dir = os .path .join (
768
768
os .path .expanduser ("~" ),
769
769
".cache" ,
@@ -1199,22 +1199,22 @@ def test_import_model_with_input_tags(
1199
1199
"model" : "oracle/oracle-1it" ,
1200
1200
"inference_container" : "odsc-vllm-serving" ,
1201
1201
},
1202
- "ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --delete_from_local True --inference_container odsc-vllm-serving" ,
1202
+ "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
1203
),
1204
1204
(
1205
1205
{
1206
1206
"os_path" : "oci://aqua-bkt@aqua-ns/path" ,
1207
1207
"model" : "ocid1.datasciencemodel.oc1.iad.<OCID>" ,
1208
1208
},
1209
- "ads aqua model register --model ocid1.datasciencemodel.oc1.iad.<OCID> --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --delete_from_local True" ,
1209
+ "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
1210
),
1211
1211
(
1212
1212
{
1213
1213
"os_path" : "oci://aqua-bkt@aqua-ns/path" ,
1214
1214
"model" : "oracle/oracle-1it" ,
1215
1215
"download_from_hf" : False ,
1216
1216
},
1217
- "ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf False --delete_from_local True" ,
1217
+ "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
1218
),
1219
1219
(
1220
1220
{
@@ -1223,7 +1223,7 @@ def test_import_model_with_input_tags(
1223
1223
"download_from_hf" : True ,
1224
1224
"model_file" : "test_model_file" ,
1225
1225
},
1226
- "ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --delete_from_local True --model_file test_model_file" ,
1226
+ "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
1227
),
1228
1228
(
1229
1229
{
@@ -1232,7 +1232,7 @@ def test_import_model_with_input_tags(
1232
1232
"inference_container" : "odsc-tei-serving" ,
1233
1233
"inference_container_uri" : "<region>.ocir.io/<your_tenancy>/<your_image>" ,
1234
1234
},
1235
- "ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path --download_from_hf True --delete_from_local True --inference_container odsc-tei-serving --inference_container_uri <region>.ocir.io/<your_tenancy>/<your_image>" ,
1235
+ "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
1236
),
1237
1237
(
1238
1238
{
@@ -1243,7 +1243,7 @@ def test_import_model_with_input_tags(
1243
1243
"defined_tags" : {"dtag1" : "dvalue1" , "dtag2" : "dvalue2" },
1244
1244
},
1245
1245
"ads aqua model register --model oracle/oracle-1it --os_path oci://aqua-bkt@aqua-ns/path "
1246
- "--download_from_hf True --delete_from_local True --inference_container odsc-vllm-serving --freeform_tags "
1246
+ "--download_from_hf True --cleanup_model_cache True --inference_container odsc-vllm-serving --freeform_tags "
1247
1247
'{"ftag1": "fvalue1", "ftag2": "fvalue2"} --defined_tags {"dtag1": "dvalue1", "dtag2": "dvalue2"}' ,
1248
1248
),
1249
1249
],
0 commit comments