Skip to content

Commit 5614af3

Browse files
authored
Merge branch 'main' into feature/ad_ODSC-62963
2 parents 5b6d50d + 505985b commit 5614af3

File tree

30 files changed

+1000
-737
lines changed

30 files changed

+1000
-737
lines changed

ads/aqua/config/evaluation/evaluation_service_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def search_shapes(
224224

225225
class Config:
226226
extra = "ignore"
227+
protected_namespaces = ()
227228

228229

229230
class EvaluationServiceConfig(Serializable):

ads/aqua/extension/model_handler.py

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from ads.aqua.extension.base_handler import AquaAPIhandler
1414
from ads.aqua.extension.errors import Errors
1515
from ads.aqua.model import AquaModelApp
16-
from ads.aqua.model.constants import ModelTask
1716
from ads.aqua.model.entities import AquaModelSummary, HFModelSummary
1817
from ads.aqua.ui import ModelFormat
1918

@@ -68,7 +67,7 @@ def read(self, model_id):
6867
return self.finish(AquaModelApp().get(model_id))
6968

7069
@handle_exceptions
71-
def delete(self):
70+
def delete(self, id=""):
7271
"""Handles DELETE request for clearing cache"""
7372
url_parse = urlparse(self.request.path)
7473
paths = url_parse.path.strip("/")
@@ -177,10 +176,8 @@ def _find_matching_aqua_model(model_id: str) -> Optional[AquaModelSummary]:
177176

178177
return None
179178

180-
181-
182179
@handle_exceptions
183-
def get(self,*args, **kwargs):
180+
def get(self, *args, **kwargs):
184181
"""
185182
Finds a list of matching models from hugging face based on query string provided from users.
186183
@@ -194,13 +191,11 @@ def get(self,*args, **kwargs):
194191
Returns the matching model ids string
195192
"""
196193

197-
query=self.get_argument("query",default=None)
194+
query = self.get_argument("query", default=None)
198195
if not query:
199-
raise HTTPError(400,Errors.MISSING_REQUIRED_PARAMETER.format("query"))
200-
models=list_hf_models(query)
201-
return self.finish({"models":models})
202-
203-
196+
raise HTTPError(400, Errors.MISSING_REQUIRED_PARAMETER.format("query"))
197+
models = list_hf_models(query)
198+
return self.finish({"models": models})
204199

205200
@handle_exceptions
206201
def post(self, *args, **kwargs):
@@ -234,16 +229,17 @@ def post(self, *args, **kwargs):
234229
"Please verify the model's status on the Hugging Face Model Hub or select a different model."
235230
)
236231

237-
# Check pipeline_tag, it should be `text-generation`
238-
if (
239-
not hf_model_info.pipeline_tag
240-
or hf_model_info.pipeline_tag.lower() != ModelTask.TEXT_GENERATION
241-
):
242-
raise AquaRuntimeError(
243-
f"Unsupported pipeline tag for the chosen model: '{hf_model_info.pipeline_tag}'. "
244-
f"AQUA currently supports the following tasks only: {', '.join(ModelTask.values())}. "
245-
"Please select a model with a compatible pipeline tag."
246-
)
232+
# Commented the validation below to let users to register any model type.
233+
# # Check pipeline_tag, it should be `text-generation`
234+
# if not (
235+
# hf_model_info.pipeline_tag
236+
# and hf_model_info.pipeline_tag.lower() in ModelTask
237+
# ):
238+
# raise AquaRuntimeError(
239+
# f"Unsupported pipeline tag for the chosen model: '{hf_model_info.pipeline_tag}'. "
240+
# f"AQUA currently supports the following tasks only: {', '.join(ModelTask.values())}. "
241+
# "Please select a model with a compatible pipeline tag."
242+
# )
247243

248244
# Check if it is a service/verified model
249245
aqua_model_info: AquaModelSummary = self._find_matching_aqua_model(

ads/aqua/model/constants.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
32
# Copyright (c) 2024 Oracle and/or its affiliates.
43
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
54

@@ -9,6 +8,7 @@
98
109
This module contains constants/enums used in Aqua Model.
1110
"""
11+
1212
from ads.common.extended_enum import ExtendedEnumMeta
1313

1414

@@ -21,6 +21,8 @@ class ModelCustomMetadataFields(str, metaclass=ExtendedEnumMeta):
2121

2222
class ModelTask(str, metaclass=ExtendedEnumMeta):
2323
TEXT_GENERATION = "text-generation"
24+
IMAGE_TEXT_TO_TEXT = "image-text-to-text"
25+
IMAGE_TO_TEXT = "image-to-text"
2426

2527

2628
class FineTuningMetricCategories(str, metaclass=ExtendedEnumMeta):

ads/opctl/operator/lowcode/forecast/MLoperator

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ type: forecast
22
version: v1
33
name: Forecasting Operator
44
conda_type: service
5-
conda: forecast_p38_cpu_v1
5+
conda: forecast_p310_cpu_x86_64_v4
66
gpu: no
77
jobs_default_params:
88
shape_name: VM.Standard.E4.Flex
9-
ocpus: 32
10-
memory_in_gbs: 512
9+
ocpus: 16
10+
memory_in_gbs: 256
1111
block_storage_size_in_GBs: 512
1212
keywords:
1313
- Prophet

ads/opctl/operator/lowcode/forecast/model/automlx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def set_kwargs(self):
4949
time_budget = model_kwargs_cleaned.pop("time_budget", -1)
5050
model_kwargs_cleaned[
5151
"preprocessing"
52-
] = self.spec.preprocessing or model_kwargs_cleaned.get("preprocessing", True)
52+
] = self.spec.preprocessing.enabled or model_kwargs_cleaned.get("preprocessing", True)
5353
return model_kwargs_cleaned, time_budget
5454

5555
def preprocess(self, data, series_id=None): # TODO: re-use self.le for explanations

ads/opctl/operator/lowcode/forecast/model/forecast_datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self, spec, historical_data):
6868
add_dates.sort()
6969
if historical_data.get_max_time() > add_dates[-spec.horizon]:
7070
raise DataMismatchError(
71-
f"The Historical Data ends on {historical_data.get_max_time()}. The additional data horizon starts on {add_dates[-spec.horizon]}. The horizon should have exactly {spec.horizon} dates after the Hisotrical at a frequency of {historical_data.freq}"
71+
f"The Historical Data ends on {historical_data.get_max_time()}. The additional data horizon starts on {add_dates[-spec.horizon]}. The horizon should have exactly {spec.horizon} dates after the Historical at a frequency of {historical_data.freq}"
7272
)
7373
elif historical_data.get_max_time() != add_dates[-(spec.horizon + 1)]:
7474
raise DataMismatchError(

docs/source/index.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ Oracle Accelerated Data Science (ADS)
2020
.. toctree::
2121
:hidden:
2222
:maxdepth: 5
23-
:caption: Getting Started:
23+
:caption: Getting Started
2424

2525
release_notes
2626
user_guide/quick_start/quick_start
2727

2828
.. toctree::
2929
:hidden:
3030
:maxdepth: 5
31-
:caption: Installation and Configuration:
31+
:caption: Installation and Configuration
3232

3333
user_guide/cli/quickstart
3434
user_guide/cli/authentication
@@ -38,19 +38,19 @@ Oracle Accelerated Data Science (ADS)
3838
.. toctree::
3939
:hidden:
4040
:maxdepth: 5
41-
:caption: Low-Code AI Operators:
41+
:caption: Low-Code AI Operators
4242

4343
user_guide/operators/index
44-
user_guide/operators/common/index
45-
user_guide/operators/forecasting_operator/index
44+
user_guide/operators/forecast_operator/index
4645
user_guide/operators/anomaly_detection_operator/index
4746
user_guide/operators/pii_operator/index
4847
user_guide/operators/recommender_operator/index
48+
user_guide/operators/common/index
4949

5050
.. toctree::
5151
:hidden:
5252
:maxdepth: 5
53-
:caption: Tasks:
53+
:caption: Tasks
5454

5555
user_guide/loading_data/connect
5656
user_guide/data_labeling/index
@@ -62,7 +62,7 @@ Oracle Accelerated Data Science (ADS)
6262
.. toctree::
6363
:hidden:
6464
:maxdepth: 5
65-
:caption: Integrations:
65+
:caption: Integrations
6666

6767
user_guide/apachespark/spark
6868
user_guide/big_data_service/index
@@ -76,7 +76,7 @@ Oracle Accelerated Data Science (ADS)
7676
.. toctree::
7777
:hidden:
7878
:maxdepth: 5
79-
:caption: Classes:
79+
:caption: Classes
8080

8181
modules
8282

docs/source/release_notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Release date: March 20, 2024
146146
Release date: February 7, 2024
147147

148148
* Releasing v1 of the Anomaly Detection Operator! The Anomaly Detection Operator is a no-code Anomaly or Outlier Detection solution through the OCI Data Science Platform. It uses dozens of models from Oracle’s own proprietary research and the best of open source. See the ``Anomaly Detection`` Section of the ``AI Operators`` tab for full details (:doc:`link <./user_guide/operators/anomaly_detection_operator/index>`).
149-
* Releasing a new version of the Forecast Operator. This release has faster explainability, improved support for reading from databases, upgrades to the automatic reporting, improved parallelization across all models, and an ability to save models for deferred inference. See the ``Forecast`` Section of the ``AI Operators`` tab for full details (:doc:`link <./user_guide/operators/forecasting_operator/index>`).
149+
* Releasing a new version of the Forecast Operator. This release has faster explainability, improved support for reading from databases, upgrades to the automatic reporting, improved parallelization across all models, and an ability to save models for deferred inference. See the ``Forecast`` Section of the ``AI Operators`` tab for full details (:doc:`link <./user_guide/operators/forecast_operator/index>`).
150150
* Change to the default signer such that it now defaults to ``resource_prinicpal`` on any OCI Data Science resource (for example, jobs, notebooks, model deployments, dataflow).
151151

152152
2.10.0

docs/source/user_guide/operators/anomaly_detection_operator/faq.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,3 @@ More details in the documentation here: https://docs.oracle.com/en-us/iaas/tools
99
**How do I learn More about AutoTS?**
1010

1111
More details in the documentation here: https://winedarksea.github.io/AutoTS/build/html/source/tutorial.html
12-
13-
**Pip Install Failing with "ERROR: No matching distribution found for oracle-automlx==23.4.1; extra == "forecast""**
14-
15-
Automlx only supports Python<=3.8, != 3.9, <= 3.10.7 . If you are builing in Python 3.9 or 3.10.8+, no automlx distribution will be available. It's recommended to use the conda pack available through Notebook Sessions, or to use Python 3.8

docs/source/user_guide/operators/anomaly_detection_operator/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Installing Through PyPi
1212

1313
If you are running the operator from outside of a Notebook Session, you may download ``oracle_ads[anomaly]`` from pypi.
1414

15-
*Note: Due to our dependence on Automlx, ``oracle_ads[anomaly]`` only supports Python<=3.8, != 3.9, <= 3.10.7 . Python 3.8 is the recommended version.*
15+
*Note: Python 3.10 is recommended.*
1616

1717
.. code-block:: bash
1818

0 commit comments

Comments
 (0)