Skip to content

Commit

Permalink
update artifact location metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
VipulMascarenhas committed Jun 11, 2024
1 parent 81f27e9 commit 6ec61b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions ads/aqua/finetuning/finetuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ def create(
source_freeform_tags.pop(Tags.LICENSE, None)
source_freeform_tags.update({Tags.READY_TO_FINE_TUNE: "false"})
source_freeform_tags.update({Tags.AQUA_TAG: UNKNOWN})
source_freeform_tags.pop(Tags.BASE_MODEL_CUSTOM, None)

self.update_model(
model_id=ft_model.id,
Expand Down
18 changes: 11 additions & 7 deletions ads/aqua/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,15 +648,19 @@ def _create_model_catalog_entry(
copy_model_config(
artifact_path=artifact_path, os_path=os_path, auth=default_signer()
)

except:
# Add artifact from user bucket
metadata.add(
key=MODEL_BY_REFERENCE_OSS_PATH_KEY,
value=os_path,
description="artifact location",
category="Other",
logger.debug(
f"Proceeding with model registration without copying model config files at {os_path}. "
f"Default configuration will be used for deployment and fine-tuning."
)
# Set artifact location to user bucket, and replace existing key if present.
metadata.add(
key=MODEL_BY_REFERENCE_OSS_PATH_KEY,
value=os_path,
description="artifact location",
category="Other",
replace=True,
)

model = (
model.with_custom_metadata_list(metadata)
Expand Down

0 comments on commit 6ec61b3

Please sign in to comment.