Skip to content

Commit eeb5f06

Browse files
authored
Merge branch 'main' into forecast_preprocessing_schema
2 parents cfa4e3d + 22b4400 commit eeb5f06

File tree

97 files changed

+10273
-429
lines changed

Some content is hidden

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

97 files changed

+10273
-429
lines changed

.github/workflows/run-unittests-default_setup.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: "[Py3.8][Py3.9][Py3.10] tests/unitary/default_setup/**"
33
on:
44
workflow_dispatch:
55
pull_request:
6+
branches: [ "main" ]
67

78
# Cancel in progress workflows on pull_requests.
89
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
@@ -43,13 +44,15 @@ jobs:
4344
name: "Test config setup"
4445

4546
- name: "Run default_setup tests folder ONLY with minimum ADS dependencies"
46-
timeout-minutes: 15
47+
timeout-minutes: 30
4748
shell: bash
4849
env:
4950
NoDependency: True
5051
run: |
5152
set -x # print commands that are executed
5253
$CONDA/bin/conda init
5354
source /home/runner/.bashrc
55+
conda install python=${{ matrix.python-version }}
5456
pip install -r test-requirements.txt
57+
conda list
5558
python -m pytest -v -p no:warnings --durations=5 tests/unitary/default_setup

.github/workflows/run-unittests-py38-cov-report.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: "[Py3.8][COV REPORT] tests/unitary/**"
33
on:
44
workflow_dispatch:
55
pull_request:
6+
branches: [ "main" ]
67

78
# Cancel in progress workflows on pull_requests.
89
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
@@ -33,9 +34,12 @@ jobs:
3334
test-path: "tests/unitary"
3435
# `model` tests running in "slow_tests",
3536
# `feature_store` tests has its own test suite
37+
# `forecast` tests has its own test suite
38+
# 'hpo' tests hangs if run together with all unitary tests. Tests running in separate command before running all unitary
3639
ignore-path: |
3740
--ignore tests/unitary/with_extras/model \
3841
--ignore tests/unitary/with_extras/feature_store \
42+
--ignore tests/unitary/with_extras/operator/forecast \
3943
--ignore tests/unitary/with_extras/hpo
4044
- name: "slow_tests"
4145
test-path: "tests/unitary/with_extras/model"
@@ -59,13 +63,13 @@ jobs:
5963

6064
- uses: ./.github/workflows/test-env-setup
6165
name: "Test env setup"
62-
timeout-minutes: 20
66+
timeout-minutes: 30
6367

64-
# Installing forecast deps for python3.8 test setup only, it will not work with python3.9/3.10, because
65-
# automlx do not support py3.9 and some versions of py3.10. This step omitted in -py39-py30.yml workflow
66-
- name: "Install Forecasting dependencies"
68+
# Installing pii deps for python3.8 test setup only, it will not work with python3.9/3.10, because
69+
# 'datapane' library conflicts with pandas>2.2.0, which used in py3.9/3.10 setup
70+
- name: "Install PII dependencies"
6771
run: |
68-
pip install -e ".[forecast]"
72+
pip install -e ".[pii]"
6973
- name: "Install featurestore marketplace dependencies"
7074
run: |
7175
pip install -e ".[feature-store-marketplace]"

.github/workflows/run-unittests-py39-py310.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ jobs:
3535
# `model` tests running in "slow_tests",
3636
# `feature_store` tests has its own test suite
3737
# `forecast` tests not supported in python 3.9,3.10 (automlx dependency). Tests are running in python3.8 test env, see run-unittests-py38-cov-report.yml
38+
# 'pii' tests run only with py3.8, 'datapane' library conflicts with pandas>2.2.0, which used in py3.9/3.10 setup
3839
# 'hpo' tests hangs if run together with all unitary tests. Tests running in separate command before running all unitary
3940
ignore-path: |
4041
--ignore tests/unitary/with_extras/model \
4142
--ignore tests/unitary/with_extras/feature_store \
4243
--ignore tests/unitary/with_extras/operator/forecast \
44+
--ignore tests/unitary/with_extras/operator/pii \
4345
--ignore tests/unitary/with_extras/hpo
4446
- name: "slow_tests"
4547
test-path: "tests/unitary/with_extras/model"
@@ -63,7 +65,7 @@ jobs:
6365

6466
- uses: ./.github/workflows/test-env-setup
6567
name: "Test env setup"
66-
timeout-minutes: 20
68+
timeout-minutes: 30
6769

6870
- name: "Run hpo tests"
6971
timeout-minutes: 10

.github/workflows/test-env-setup/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ runs:
1414
sudo apt-get install libkrb5-dev graphviz
1515
$CONDA/bin/conda init
1616
source /home/runner/.bashrc
17-
17+
conda install python=${{ matrix.python-version }}
1818
pip install -r dev-requirements.txt
19+
conda list

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @darenr @mayoor @mrDzurb @VipulMascarenhas @qiuosier

README-development.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ To run all unit test install extra dependencies to test all modules of ADS ASD.
101101

102102
```bash
103103
# Update your environment with tests dependencies
104-
pip install -r dev-requirements.txt
104+
pip install -r test-requirements.txt
105+
pip install -e ".[testsuite]"
105106
# Run all unit tests
106107
python3 -m pytest tests/unitary
107108
```
@@ -113,7 +114,8 @@ To run all but opctl integration tests, you can run:
113114

114115
```bash
115116
# Update your environment with tests dependencies
116-
pip install -r dev-requirements.txt
117+
pip install -r test-requirements.txt
118+
pip install -e ".[testsuite]"
117119
# Run integration tests
118120
python3 -m pytest tests/integration --ignore=tests/integration/opctl
119121
```

THIRD_PARTY_LICENSES.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,19 @@ delta
405405
* Source code: https://github.com/delta-io/delta/
406406
* Project home: https://delta.io/
407407

408+
cachetools
409+
* Copyright (c) 2014-2024 Thomas Kemmer
410+
* License: The MIT License (MIT)
411+
* Source code: https://github.com/tkem/cachetools/
412+
* Project home: https://cachetools.readthedocs.io/
413+
414+
python-fire
415+
* Copyright 2017 Google Inc. All rights reserved.
416+
* License: Apache License 2.0
417+
* Source code: https://github.com/google/python-fire
418+
* Project home: https://github.com/google/python-fire
419+
420+
=======
408421
=============================== Licenses ===============================
409422
------------------------------------------------------------------------
410423

ads/aqua/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
# Copyright (c) 2024 Oracle and/or its affiliates.
4+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
5+
6+
7+
import logging
8+
import sys
9+
import os
10+
from ads.aqua.utils import fetch_service_compartment
11+
from ads.config import OCI_RESOURCE_PRINCIPAL_VERSION
12+
from ads import set_auth
13+
14+
logger = logging.getLogger(__name__)
15+
handler = logging.StreamHandler(sys.stdout)
16+
logger.setLevel(logging.INFO)
17+
18+
if OCI_RESOURCE_PRINCIPAL_VERSION:
19+
set_auth("resource_principal")
20+
21+
ODSC_MODEL_COMPARTMENT_OCID = os.environ.get("ODSC_MODEL_COMPARTMENT_OCID")
22+
if not ODSC_MODEL_COMPARTMENT_OCID:
23+
try:
24+
ODSC_MODEL_COMPARTMENT_OCID = fetch_service_compartment()
25+
except Exception as e:
26+
logger.error(
27+
f"ODSC_MODEL_COMPARTMENT_OCID environment variable is not set for Aqua, due to {e}."
28+
)

0 commit comments

Comments
 (0)