@@ -653,7 +653,7 @@ def test_get_model_fine_tuned(
653653 }
654654
655655 @pytest .mark .parametrize (
656- ("artifact_location_set" , "download_from_hf" , "delete_from_local " ),
656+ ("artifact_location_set" , "download_from_hf" , "cleanup_model_cache " ),
657657 [
658658 (True , True , True ),
659659 (True , False , True ),
@@ -683,7 +683,7 @@ def test_import_verified_model(
683683 mock_ocidsc_create ,
684684 artifact_location_set ,
685685 download_from_hf ,
686- delete_from_local ,
686+ cleanup_model_cache ,
687687 mock_get_hf_model_info ,
688688 mock_init_client ,
689689 ):
@@ -748,7 +748,7 @@ def test_import_verified_model(
748748 os_path = os_path ,
749749 local_dir = str (tmpdir ),
750750 download_from_hf = True ,
751- delete_from_local = delete_from_local ,
751+ cleanup_model_cache = cleanup_model_cache ,
752752 allow_patterns = ["*.json" ],
753753 ignore_patterns = ["test.json" ],
754754 )
@@ -763,7 +763,7 @@ def test_import_verified_model(
763763 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 } *"
764764 )
765765 )
766- if delete_from_local :
766+ if cleanup_model_cache :
767767 cache_dir = os .path .join (
768768 os .path .expanduser ("~" ),
769769 ".cache" ,
@@ -1199,22 +1199,22 @@ def test_import_model_with_input_tags(
11991199 "model" : "oracle/oracle-1it" ,
12001200 "inference_container" : "odsc-vllm-serving" ,
12011201 },
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" ,
12031203 ),
12041204 (
12051205 {
12061206 "os_path" : "oci://aqua-bkt@aqua-ns/path" ,
12071207 "model" : "ocid1.datasciencemodel.oc1.iad.<OCID>" ,
12081208 },
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" ,
12101210 ),
12111211 (
12121212 {
12131213 "os_path" : "oci://aqua-bkt@aqua-ns/path" ,
12141214 "model" : "oracle/oracle-1it" ,
12151215 "download_from_hf" : False ,
12161216 },
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" ,
12181218 ),
12191219 (
12201220 {
@@ -1223,7 +1223,7 @@ def test_import_model_with_input_tags(
12231223 "download_from_hf" : True ,
12241224 "model_file" : "test_model_file" ,
12251225 },
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" ,
12271227 ),
12281228 (
12291229 {
@@ -1232,7 +1232,7 @@ def test_import_model_with_input_tags(
12321232 "inference_container" : "odsc-tei-serving" ,
12331233 "inference_container_uri" : "<region>.ocir.io/<your_tenancy>/<your_image>" ,
12341234 },
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>" ,
12361236 ),
12371237 (
12381238 {
@@ -1243,7 +1243,7 @@ def test_import_model_with_input_tags(
12431243 "defined_tags" : {"dtag1" : "dvalue1" , "dtag2" : "dvalue2" },
12441244 },
12451245 "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 "
12471247 '{"ftag1": "fvalue1", "ftag2": "fvalue2"} --defined_tags {"dtag1": "dvalue1", "dtag2": "dvalue2"}' ,
12481248 ),
12491249 ],
0 commit comments