Skip to content

Commit 31b04e8

Browse files
liudmylaruspavlusievajdesantomrDzurbqiuosier
authored
Sync main and develop branches (#117)
Co-authored-by: Oleksandra Pavlusieva <oleksandra.pavlusieva@gmail.com> Co-authored-by: John DeSanto <202220+jdesanto@users.noreply.github.com> Co-authored-by: Dmitrii Cherkasov <dmitrii.cherkasov@oracle.com> Co-authored-by: Qiu Qin <qiu.qin@oracle.com> Co-authored-by: Ziqun Ye <ziqun.ye@oracle.com> Co-authored-by: Lu Peng <bolu.peng@oracle.com> Co-authored-by: Lu Peng <118394507+lu-ohai@users.noreply.github.com> Co-authored-by: MING KANG <ming.kang@oracle.com> Co-authored-by: Daren Race <daren.race@gmail.com> Co-authored-by: Mayoor Rao <mayoor.rao@oracle.com> Co-authored-by: Mayoor Rao <mayoor.rao@gmail.com>
1 parent c06c589 commit 31b04e8

File tree

352 files changed

+18519
-12420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

352 files changed

+18519
-12420
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Unit Tests unitary/default_setup/*
2+
3+
on:
4+
workflow_dispatch:
5+
6+
# Cancel in progress workflows on pull_requests.
7+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
test:
17+
name: python ${{ matrix.python-version }}, tests/unitary/default_setup
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 20
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
python-version: ["3.8", "3.9", "3.10"]
25+
26+
steps:
27+
- uses: actions/checkout@v3
28+
29+
# Caching python libraries installed with pip
30+
# https://github.com/actions/cache/blob/main/examples.md#python---pip
31+
- uses: actions/cache@v3
32+
with:
33+
path: ~/.cache/pip
34+
key: ${{ runner.os }}-pip-${{ hashFiles('**/test-requirements.txt') }}
35+
restore-keys: |
36+
${{ runner.os }}-pip-
37+
- uses: actions/setup-python@v4
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
41+
# - name: "Test config setup"
42+
# shell: bash
43+
# env:
44+
# ADS_OCI_CONFIG_REALLIKE: ${{ secrets.ADS_OCI_CONFIG_REALLIKE }}
45+
# ADS_OCI_PRIVATE_KEY_REALLIKE: ${{ secrets.ADS_OCI_PRIVATE_KEY_REALLIKE }}
46+
# run: |
47+
# set -x # print commands that are executed
48+
# mkdir -p /home/runner/.oci
49+
# ls -lha
50+
# echo "$ADS_OCI_CONFIG_REALLIKE" > "/home/runner/.oci/config"
51+
# echo "$ADS_OCI_PRIVATE_KEY_REALLIKE" > "/home/runner/.oci/oci_ads_user.pem"
52+
# echo "key_file=/home/runner/.oci/oci_ads_user.pem" >> "/home/runner/.oci/config"
53+
54+
# - name: "Run default_setup tests folder ONLY with minimum ADS dependencies"
55+
# timeout-minutes: 15
56+
# shell: bash
57+
# env:
58+
# NB_SESSION_COMPARTMENT_OCID: ocid1.compartment.oc1.<unique_ocid>
59+
# NoDependency: True
60+
# run: |
61+
# set -x # print commands that are executed
62+
# $CONDA/bin/conda init
63+
# source /home/runner/.bashrc
64+
# pip install -r test-requirements.txt
65+
# python -m pytest -v -p no:warnings --durations=5 tests/unitary/default_setup
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Unit Tests unitary
2+
3+
on:
4+
workflow_dispatch:
5+
6+
# Cancel in progress workflows on pull_requests.
7+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
16+
# hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
17+
env:
18+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
19+
20+
jobs:
21+
test:
22+
name: python ${{ matrix.python-version }}, ${{ matrix.test-path }}, ignore ${{ matrix.ignore-path }}
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 90
25+
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
python-version: ["3.8", "3.9", "3.10"]
30+
test-path: ["tests/unitary", "tests/unitary/with_extras/model"]
31+
include:
32+
- test-path: "tests/unitary"
33+
ignore-path: "tests/unitary/with_extras/model"
34+
35+
steps:
36+
- uses: actions/checkout@v3
37+
38+
# Caching python libraries installed with pip
39+
# https://github.com/actions/cache/blob/main/examples.md#python---pip
40+
- uses: actions/cache@v3
41+
with:
42+
path: ~/.cache/pip
43+
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }}
44+
restore-keys: |
45+
${{ runner.os }}-pip-
46+
47+
- uses: actions/setup-python@v4
48+
with:
49+
python-version: ${{ matrix.python-version }}
50+
51+
# - name: "Test config setup"
52+
# shell: bash
53+
# env:
54+
# ADS_OCI_CONFIG_REALLIKE: ${{ secrets.ADS_OCI_CONFIG_REALLIKE }}
55+
# ADS_OCI_PRIVATE_KEY_REALLIKE: ${{ secrets.ADS_OCI_PRIVATE_KEY_REALLIKE }}
56+
# run: |
57+
# set -x # print commands that are executed
58+
# mkdir -p /home/runner/.oci
59+
# ls -lha
60+
# echo "$ADS_OCI_CONFIG_REALLIKE" > "/home/runner/.oci/config"
61+
# echo "$ADS_OCI_PRIVATE_KEY_REALLIKE" > "/home/runner/.oci/oci_ads_user.pem"
62+
# echo "key_file=/home/runner/.oci/oci_ads_user.pem" >> "/home/runner/.oci/config"
63+
64+
# - name: "Test env setup"
65+
# timeout-minutes: 20
66+
# shell: bash
67+
# run: |
68+
# set -x # print commands that are executed
69+
# sudo apt-get install libkrb5-dev graphviz
70+
# $CONDA/bin/conda init
71+
# source /home/runner/.bashrc
72+
# pip install setuptools
73+
# pip install -r dev-requirements.txt
74+
75+
# - name: "Run unitary tests folder with maximum ADS dependencies"
76+
# timeout-minutes: 60
77+
# shell: bash
78+
# env:
79+
# NB_SESSION_COMPARTMENT_OCID: ocid1.compartment.oc1.<unique_ocid>
80+
# CONDA_PREFIX: /usr/share/miniconda
81+
# run: |
82+
# python -m pytest -v -p no:warnings --durations=5 \
83+
# ${{ matrix.test-path }} \
84+
# --ignore "${{ matrix.ignore-path }}" \
85+
# --cov --cov-append --cov-report=html
86+
87+
# Uploading test artifacts
88+
# https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#uploading-build-and-test-artifacts
89+
# - name: "Save html coverage report"
90+
# uses: actions/upload-artifact@v3
91+
# with:
92+
# name: code-coverage-report
93+
# path: htmlcov/
94+
# retention-days: 10

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![PyPI](https://img.shields.io/pypi/v/oracle-ads.svg)](https://pypi.org/project/oracle-ads/) [![Python](https://img.shields.io/pypi/pyversions/oracle-ads.svg?style=plastic)](https://pypi.org/project/oracle-ads/)
44

5-
The [Oracle Accelerated Data Science (ADS) SDK](https://accelerated-data-science.readthedocs.io/en/latest/index.html) is maintained by the Oracle Cloud Infrastructure (OCI) [Data Science service](https://docs.oracle.com/en-us/iaas/data-science/using/data-science.htm) team. It speeds up common data science activities by providing tools that automate and simplify common data science tasks. Additionally, provides data scientists a friendly pythonic interface to OCI services. Some of the more notable services are OCI Data Science, Model Catalog, Model Deployment, Jobs, Data Flow, Object Storage, Vault, Big Data Service, Data Catalog, and the Autonomous Database. ADS gives you an interface to manage the life cycle of machine learning models, from data acquisition to model evaluation, interpretation, and model deployment.
5+
The [Oracle Accelerated Data Science (ADS) SDK](https://accelerated-data-science.readthedocs.io/en/latest/index.html) is maintained by the Oracle Cloud Infrastructure (OCI) [Data Science service](https://docs.oracle.com/en-us/iaas/data-science/using/data-science.htm) team. It speeds up common data science activities by providing tools that automate and simplify common data science tasks. Additionally, provides data scientists a friendly pythonic interface to OCI services. Some of the more notable services are OCI Data Science, Model Catalog, Model Deployment, Jobs, ML Pipelines, Data Flow, Object Storage, Vault, Big Data Service, Data Catalog, and the Autonomous Database. ADS gives you an interface to manage the life cycle of machine learning models, from data acquisition to model evaluation, interpretation, and model deployment.
66

77
With ADS you can:
88

@@ -14,6 +14,7 @@ With ADS you can:
1414
- Deploy models as HTTP endpoints with [Model Deployment](https://docs.oracle.com/en-us/iaas/data-science/using/model-dep-about.htm).
1515
- Launch distributed ETL, data processing, and model training jobs in Spark with [OCI Data Flow](https://docs.oracle.com/en-us/iaas/data-flow/using/home.htm).
1616
- Train machine learning models in OCI Data Science [Jobs](https://docs.oracle.com/en-us/iaas/data-science/using/jobs-about.htm).
17+
- Define and run an end-to-end machine learning orchestration covering all the steps of machine learning lifecycle in a repeatable, continuous [ML Pipelines](https://accelerated-data-science.readthedocs.io/en/latest/user_guide/pipeline/overview.html#).
1718
- Manage the life cycle of conda environments through the `ads conda` command line interface (CLI).
1819

1920
## Installation
@@ -166,7 +167,7 @@ This example uses SQL injection safe binding variables.
166167

167168
## Contributing
168169

169-
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide [CONTRIBUTING.md](https://github.com/oracle/accelerated-data-science/blob/main/CONTRIBUTING.md).
170+
This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)
170171

171172
Find Getting Started instructions for developers in [README-development.md](https://github.com/oracle/accelerated-data-science/blob/main/README-development.md)
172173

SECURITY.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ and privacy of all our users.
66

77
Please do NOT raise a GitHub Issue to report a security vulnerability. If you
88
believe you have found a security vulnerability, please submit a report to
9-
[secalert_us@oracle.com](mailto:secalert_us@oracle.com) preferably with a proof of concept.
10-
Please review some additional information on
11-
[how to report security vulnerabilities to Oracle](https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html).
9+
[secalert_us@oracle.com][1] preferably with a proof of concept. Please review
10+
some additional information on [how to report security vulnerabilities to Oracle][2].
1211
We encourage people who contact Oracle Security to use email encryption using
13-
[our encryption key](https://www.oracle.com/security-alerts/encryptionkey.html).
12+
[our encryption key][3].
1413

1514
We ask that you do not use other channels or contact the project maintainers
1615
directly.
@@ -22,15 +21,18 @@ security features are welcome on GitHub Issues.
2221

2322
Security updates will be released on a regular cadence. Many of our projects
2423
will typically release security fixes in conjunction with the
25-
[Oracle Critical Patch Update](https://www.oracle.com/security-alerts/encryptionkey.html) program.
26-
Security updates are released on the Tuesday closest to the 17th day of January, April, July and October.
27-
A pre-release announcement will be published on the Thursday preceding each release. Additional
28-
information, including past advisories, is available on our
29-
[security alerts](https://www.oracle.com/security-alerts/) page.
24+
[Oracle Critical Patch Update][3] program. Additional
25+
information, including past advisories, is available on our [security alerts][4]
26+
page.
3027

3128
## Security-related information
3229

3330
We will provide security related information such as a threat model, considerations
3431
for secure use, or any known security issues in our documentation. Please note
3532
that labs and sample code are intended to demonstrate a concept and may not be
3633
sufficiently hardened for production use.
34+
35+
[1]: mailto:secalert_us@oracle.com
36+
[2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
37+
[3]: https://www.oracle.com/security-alerts/encryptionkey.html
38+
[4]: https://www.oracle.com/security-alerts/

ads/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*--
33

4-
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
4+
# Copyright (c) 2020, 2023 Oracle and/or its affiliates.
55
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
66

77
from __future__ import print_function, division, absolute_import
@@ -26,6 +26,7 @@
2626
from ads.feature_engineering.accessor.dataframe_accessor import ADSDataFrameAccessor
2727
from ads.common import auth
2828
from ads.common.auth import set_auth
29+
from ads.common.config import Config
2930

3031
os.environ["GIT_PYTHON_REFRESH"] = "quiet"
3132

ads/ads_version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "2.8.0"
2+
"version": "2.8.3"
33
}

ads/automl/driver.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*--
33

4-
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
4+
# Copyright (c) 2020, 2023 Oracle and/or its affiliates.
55
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
66

77
from __future__ import absolute_import, division, print_function
88

9+
import copy
10+
911
import numpy as np
1012
import pandas as pd
1113
import scipy
12-
import copy
14+
1315
from ads.common import logger, utils
16+
from ads.common.decorator.deprecate import deprecated
1417
from ads.common.model import ADSModel
1518
from ads.dataset import helper
1619
from ads.dataset.classification_dataset import (
@@ -37,6 +40,10 @@
3740
}
3841

3942

43+
@deprecated(
44+
details="Working with AutoML has moved from within ADS to working directly with the AutoMLx library. AutoMLx are preinstalled in conda pack automlx_p38_cpu_v2 and later, and can now be updated independently of ADS. AutoMLx documentation may be found at https://docs.oracle.com/en-us/iaas/tools/automlx/latest/html/multiversion/v23.1.1/index.html. Notebook examples are in Oracle's samples repository: https://github.com/oracle-samples/oci-data-science-ai-samples/tree/master/notebook_examples and a migration tutorial can be found at https://accelerated-data-science.readthedocs.io/en/latest/user_guide/model_training/automl/quick_start.html .",
45+
raise_error=True,
46+
)
4047
def get_ml_task_type(X, y, classes):
4148
"""
4249
Gets the ML task type and returns it.
@@ -79,6 +86,10 @@ def get_ml_task_type(X, y, classes):
7986

8087

8188
class AutoML:
89+
@deprecated(
90+
details="Working with AutoML has moved from within ADS to working directly with the AutoMLx library. AutoMLx are preinstalled in conda pack automlx_p38_cpu_v2 and later, and can now be updated independently of ADS. AutoMLx documentation may be found at https://docs.oracle.com/en-us/iaas/tools/automlx/latest/html/multiversion/v23.1.1/index.html. Notebook examples are in Oracle's samples repository: https://github.com/oracle-samples/oci-data-science-ai-samples/tree/master/notebook_examples and a migration tutorial can be found at https://accelerated-data-science.readthedocs.io/en/latest/user_guide/model_training/automl/quick_start.html .",
91+
raise_error=True,
92+
)
8293
def __init__(
8394
self,
8495
training_data,
@@ -87,7 +98,7 @@ def __init__(
8798
baseline="dummy",
8899
client=None,
89100
):
90-
r"""
101+
"""
91102
Creates an Automatic machine learning object.
92103
93104
Parameters

ads/automl/provider.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8; -*-
33

4-
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
4+
# Copyright (c) 2020, 2023 Oracle and/or its affiliates.
55
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
66

77
import logging
@@ -41,6 +41,10 @@ class AutoMLProvider(ABC):
4141
implement train() and get_transformer_pipeline().
4242
"""
4343

44+
@deprecated(
45+
details="Working with AutoML has moved from within ADS to working directly with the AutoMLx library. AutoMLx are preinstalled in conda pack automlx_p38_cpu_v2 and later, and can now be updated independently of ADS. AutoMLx documentation may be found at https://docs.oracle.com/en-us/iaas/tools/automlx/latest/html/multiversion/v23.1.1/index.html. Notebook examples are in Oracle's samples repository: https://github.com/oracle-samples/oci-data-science-ai-samples/tree/master/notebook_examples and a migration tutorial can be found at https://accelerated-data-science.readthedocs.io/en/latest/user_guide/model_training/automl/quick_start.html .",
46+
raise_error=True,
47+
)
4448
def __init__(self):
4549
self.X_train = None
4650
self.y_train = None
@@ -143,6 +147,10 @@ class BaselineModel(object):
143147
interface. Labels (y) are encoded using DataFrameLabelEncoder.
144148
"""
145149

150+
@deprecated(
151+
details="Working with AutoML has moved from within ADS to working directly with the AutoMLx library. AutoMLx are preinstalled in conda pack automlx_p38_cpu_v2 and later, and can now be updated independently of ADS. AutoMLx documentation may be found at https://docs.oracle.com/en-us/iaas/tools/automlx/latest/html/multiversion/v23.1.1/index.html. Notebook examples are in Oracle's samples repository: https://github.com/oracle-samples/oci-data-science-ai-samples/tree/master/notebook_examples and a migration tutorial can be found at https://accelerated-data-science.readthedocs.io/en/latest/user_guide/model_training/automl/quick_start.html .",
152+
raise_error=True,
153+
)
146154
def __init__(self, est):
147155
self.est = est
148156
self.df_label_encoder = DataFrameLabelEncoder()
@@ -250,6 +258,10 @@ def get_transformer_pipeline(self):
250258
msg = "Baseline"
251259
return [("automl_preprocessing", AutoMLPreprocessingTransformer(msg))]
252260

261+
@deprecated(
262+
details="Working with AutoML has moved from within ADS to working directly with the AutoMLx library. AutoMLx are preinstalled in conda pack automlx_p38_cpu_v2 and later, and can now be updated independently of ADS. AutoMLx documentation may be found at https://docs.oracle.com/en-us/iaas/tools/automlx/latest/html/multiversion/v23.1.1/index.html. Notebook examples are in Oracle's samples repository: https://github.com/oracle-samples/oci-data-science-ai-samples/tree/master/notebook_examples and a migration tutorial can be found at https://accelerated-data-science.readthedocs.io/en/latest/user_guide/model_training/automl/quick_start.html .",
263+
raise_error=True,
264+
)
253265
def __init__(self, est):
254266
"""
255267
Generates a baseline model using the Zero Rule algorithm by default. For a classification
@@ -309,6 +321,7 @@ class OracleAutoMLProvider(AutoMLProvider, ABC):
309321
@deprecated(
310322
"2.6.7",
311323
details="Oracle AutoML is recommended to be directly instantiated by importing automlx package",
324+
raise_error=True,
312325
)
313326
def __init__(
314327
self, n_jobs=-1, loglevel=None, logger_override=None, model_n_jobs: int = 1
@@ -870,6 +883,10 @@ def visualize_tuning_trials(self, ylabel=None):
870883

871884

872885
class AutoMLPreprocessingTransformer(object): # pragma: no cover
886+
@deprecated(
887+
details="Working with AutoML has moved from within ADS to working directly with the AutoMLx library. AutoMLx are preinstalled in conda pack automlx_p38_cpu_v2 and later, and can now be updated independently of ADS. AutoMLx documentation may be found at https://docs.oracle.com/en-us/iaas/tools/automlx/latest/html/multiversion/v23.1.1/index.html. Notebook examples are in Oracle's samples repository: https://github.com/oracle-samples/oci-data-science-ai-samples/tree/master/notebook_examples and a migration tutorial can be found at https://accelerated-data-science.readthedocs.io/en/latest/user_guide/model_training/automl/quick_start.html .",
888+
raise_error=True,
889+
)
873890
def __init__(self, msg):
874891
self.msg = msg
875892

@@ -915,6 +932,10 @@ def __repr__(self):
915932

916933

917934
class AutoMLFeatureSelection(object): # pragma: no cover
935+
@deprecated(
936+
details="Working with AutoML has moved from within ADS to working directly with the AutoMLx library. AutoMLx are preinstalled in conda pack automlx_p38_cpu_v2 and later, and can now be updated independently of ADS. AutoMLx documentation may be found at https://docs.oracle.com/en-us/iaas/tools/automlx/latest/html/multiversion/v23.1.1/index.html. Notebook examples are in Oracle's samples repository: https://github.com/oracle-samples/oci-data-science-ai-samples/tree/master/notebook_examples and a migration tutorial can be found at https://accelerated-data-science.readthedocs.io/en/latest/user_guide/model_training/automl/quick_start.html .",
937+
raise_error=True,
938+
)
918939
def __init__(self, msg):
919940
self.msg = msg
920941

0 commit comments

Comments
 (0)