Skip to content

Commit 6ec61b3

Browse files
update artifact location metadata
1 parent 81f27e9 commit 6ec61b3

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

ads/aqua/finetuning/finetuning.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ def create(
366366
source_freeform_tags.pop(Tags.LICENSE, None)
367367
source_freeform_tags.update({Tags.READY_TO_FINE_TUNE: "false"})
368368
source_freeform_tags.update({Tags.AQUA_TAG: UNKNOWN})
369+
source_freeform_tags.pop(Tags.BASE_MODEL_CUSTOM, None)
369370

370371
self.update_model(
371372
model_id=ft_model.id,

ads/aqua/model/model.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -648,15 +648,19 @@ def _create_model_catalog_entry(
648648
copy_model_config(
649649
artifact_path=artifact_path, os_path=os_path, auth=default_signer()
650650
)
651-
652651
except:
653-
# Add artifact from user bucket
654-
metadata.add(
655-
key=MODEL_BY_REFERENCE_OSS_PATH_KEY,
656-
value=os_path,
657-
description="artifact location",
658-
category="Other",
652+
logger.debug(
653+
f"Proceeding with model registration without copying model config files at {os_path}. "
654+
f"Default configuration will be used for deployment and fine-tuning."
659655
)
656+
# Set artifact location to user bucket, and replace existing key if present.
657+
metadata.add(
658+
key=MODEL_BY_REFERENCE_OSS_PATH_KEY,
659+
value=os_path,
660+
description="artifact location",
661+
category="Other",
662+
replace=True,
663+
)
660664

661665
model = (
662666
model.with_custom_metadata_list(metadata)

0 commit comments

Comments
 (0)