From a2e07e788fc5f40a94cb7b0c979a400cfc6d311a Mon Sep 17 00:00:00 2001 From: Vipul Date: Tue, 4 Feb 2025 20:56:28 +0530 Subject: [PATCH] fix config load paths and update ads version --- ads/aqua/app.py | 6 ++++-- docs/source/release_notes.rst | 7 +++++++ pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ads/aqua/app.py b/ads/aqua/app.py index c5d2e1c2d..95b77b6a8 100644 --- a/ads/aqua/app.py +++ b/ads/aqua/app.py @@ -306,11 +306,9 @@ def get_config(self, model_id: str, config_file_name: str) -> Dict: ) 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/" 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/" if not artifact_path: logger.debug( @@ -318,6 +316,10 @@ def get_config(self, model_id: str, config_file_name: str) -> Dict: ) return config + config_path = f"{os.path.dirname(artifact_path)}/config/" + if not is_path_exists(config_path): + config_path = f"{artifact_path.rstrip('/')}/config/" + config_file_path = f"{config_path}{config_file_name}" if is_path_exists(config_file_path): try: diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index c19891726..addfac79a 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 6f99c9a11..3caf27227 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"