Skip to content

Commit

Permalink
Resolving conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kumar-shivam-ranjan committed Feb 4, 2025
2 parents 43f94b0 + 7ce9342 commit 035c4ee
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
11 changes: 8 additions & 3 deletions ads/aqua/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,18 +314,23 @@ def get_config(
)
base_model = self.ds_client.get_model(base_model_ocid).data
artifact_path = get_artifact_path(base_model.custom_metadata_list)
config_path = f"{os.path.dirname(artifact_path)}/{config_folder}/"
if config_folder == "artifact":
artifact_path = get_artifact_path(oci_model.custom_metadata_list)
else:
logger.info(f"Loading {config_file_name} for model {oci_model.id}...")
artifact_path = get_artifact_path(oci_model.custom_metadata_list)
config_path = f"{artifact_path.rstrip('/')}/{config_folder}/"
if not artifact_path:
logger.debug(
f"Failed to get artifact path from custom metadata for the model: {model_id}"
)
return config

config_file_path = f"{config_path.rstrip('/')}/{config_file_name}"
config_path = f"{os.path.dirname(artifact_path)}/{config_folder}/"
if not is_path_exists(config_path):
config_path = f"{artifact_path.rstrip('/')}/{config_folder}/"
if not is_path_exists(config_path):
config_path = f"{artifact_path.rstrip('/')}/"
config_file_path = f"{config_path}{config_file_name}"
if is_path_exists(config_file_path):
try:
config = load_config(
Expand Down
2 changes: 1 addition & 1 deletion ads/aqua/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def get_hf_tokenizer_config(self, model_id):
str:
Chat template string.
"""
config = self.get_config(model_id, AQUA_MODEL_TOKENIZER_CONFIG, "/")
config = self.get_config(model_id, AQUA_MODEL_TOKENIZER_CONFIG, "artifact")
if not config:
logger.debug(f"Tokenizer config for model: {model_id} is not available.")
return config
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.12.11
-------
Release date: Feb 5th, 2024

* Fixed bug while loading model configuration in AI Quick Actions.


2.12.10
-------
Release date: Feb 5th, 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.12.10"
version = "2.12.11"

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

0 comments on commit 035c4ee

Please sign in to comment.