File tree Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change 29
29
LifecycleStatus ,
30
30
_build_resource_identifier ,
31
31
cleanup_local_hf_model_artifact ,
32
- copy_model_config ,
33
32
create_word_icon ,
34
33
generate_tei_cmd_var ,
35
34
get_artifact_path ,
@@ -969,24 +968,6 @@ def _create_model_catalog_entry(
969
968
)
970
969
tags [Tags .LICENSE ] = validation_result .tags .get (Tags .LICENSE , UNKNOWN )
971
970
972
- try :
973
- # If verified model already has a artifact json, use that.
974
- artifact_path = metadata .get (MODEL_BY_REFERENCE_OSS_PATH_KEY ).value
975
- logger .info (
976
- f"Found model artifact in the service bucket. "
977
- f"Using artifact from service bucket instead of { os_path } ."
978
- )
979
-
980
- # todo: implement generic copy_folder method
981
- # copy model config from artifact path to user bucket
982
- copy_model_config (
983
- artifact_path = artifact_path , os_path = os_path , auth = default_signer ()
984
- )
985
- except Exception :
986
- logger .debug (
987
- f"Proceeding with model registration without copying model config files at { os_path } . "
988
- f"Default configuration will be used for deployment and fine-tuning."
989
- )
990
971
# Set artifact location to user bucket, and replace existing key if present.
991
972
metadata .add (
992
973
key = MODEL_BY_REFERENCE_OSS_PATH_KEY ,
Original file line number Diff line number Diff line change @@ -665,7 +665,6 @@ def test_get_model_fine_tuned(
665
665
@patch ("ads.model.datascience_model.DataScienceModel.sync" )
666
666
@patch ("ads.model.datascience_model.DataScienceModel.upload_artifact" )
667
667
@patch .object (AquaModelApp , "_find_matching_aqua_model" )
668
- @patch ("ads.aqua.common.utils.copy_file" )
669
668
@patch ("ads.common.object_storage_details.ObjectStorageDetails.list_objects" )
670
669
@patch ("ads.aqua.common.utils.load_config" , return_value = {})
671
670
@patch ("huggingface_hub.snapshot_download" )
@@ -676,7 +675,6 @@ def test_import_verified_model(
676
675
mock_snapshot_download ,
677
676
mock_load_config ,
678
677
mock_list_objects ,
679
- mock_copy_file ,
680
678
mock__find_matching_aqua_model ,
681
679
mock_upload_artifact ,
682
680
mock_sync ,
@@ -788,8 +786,6 @@ def test_import_verified_model(
788
786
mock_subprocess .assert_not_called ()
789
787
mock_load_config .assert_called ()
790
788
791
- if not artifact_location_set :
792
- mock_copy_file .assert_called ()
793
789
ds_freeform_tags .pop (
794
790
"ready_to_import"
795
791
) # The imported model should not have this tag
You can’t perform that action at this time.
0 commit comments