Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version to 2.11.11 with bug fixes #880

Merged
merged 7 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions ads/aqua/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,23 +668,18 @@ def get_model_by_reference_paths(model_file_description: dict):
fine_tune_output_path = UNKNOWN
models = model_file_description["models"]

for model in models:
namespace, bucket_name, prefix = (
model["namespace"],
model["bucketName"],
model["prefix"],
)
bucket_uri = f"oci://{bucket_name}@{namespace}/{prefix}".rstrip("/")
if bucket_name == AQUA_SERVICE_MODELS_BUCKET:
base_model_path = bucket_uri
else:
fine_tune_output_path = bucket_uri
if models:
VipulMascarenhas marked this conversation as resolved.
Show resolved Hide resolved
if len(models) > 0:
base_model_artifact = models[0]
VipulMascarenhas marked this conversation as resolved.
Show resolved Hide resolved
base_model_path = f"oci://{base_model_artifact['bucketName']}@{base_model_artifact['namespace']}/{base_model_artifact['prefix']}".rstrip(
"/"
)
if len(models) == 2:
ft_model_artifact = models[1]
fine_tune_output_path = f"oci://{ft_model_artifact['bucketName']}@{ft_model_artifact['namespace']}/{ft_model_artifact['prefix']}".rstrip(
"/"
)

if not base_model_path:
raise AquaValueError(
f"Base Model should come from the bucket {AQUA_SERVICE_MODELS_BUCKET}. "
f"Other paths are not supported by Aqua."
)
return base_model_path, fine_tune_output_path


Expand Down
13 changes: 8 additions & 5 deletions ads/aqua/finetuning/finetuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,13 @@ def create(
)

source = self.get_source(create_fine_tuning_details.ft_source_id)
if source.compartment_id != ODSC_MODEL_COMPARTMENT_OCID:
raise AquaValueError(
f"Fine tuning is only supported for Aqua service models in {ODSC_MODEL_COMPARTMENT_OCID}. "
"Use a valid Aqua service model id instead."
)

# todo: revisit validation for fine tuned models
# if source.compartment_id != ODSC_MODEL_COMPARTMENT_OCID:
# raise AquaValueError(
# f"Fine tuning is only supported for Aqua service models in {ODSC_MODEL_COMPARTMENT_OCID}. "
# "Use a valid Aqua service model id instead."
# )

target_compartment = (
create_fine_tuning_details.compartment_id or COMPARTMENT_OCID
Expand Down Expand Up @@ -364,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
7 changes: 7 additions & 0 deletions docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Release Notes
=============

2.11.11
------
Release date: June 5, 2024

* Fixed the bug that led to timeout when loading config files during jupyterlab load.


2.11.10
------
Release date: June 5, 2024
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build-backend = "flit_core.buildapi"

# Required
name = "oracle_ads" # the install (PyPI) name; name for local build in [tool.flit.module] section below
version = "2.11.10"
version = "2.11.11"

# Optional
description = "Oracle Accelerated Data Science SDK"
Expand Down
Loading