Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
223 changes: 188 additions & 35 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,70 +6,223 @@ name: Build
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
branches: [ "master" ]
branches: ["master"]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

build-on-all:
# job to build CEM on python 3.6.
build-cem-on-py36:
# The type of runner that the job will run on
runs-on: '${{ matrix.os }}'
runs-on: "${{ matrix.os }}"
strategy:
matrix:
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ['3.6']
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.6"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Step 1 - checkout aix360 repository
uses: actions/checkout@v3

- name: Step 2 - set up python version
uses: actions/setup-python@v4
with:
python-version: '${{ matrix.python-version }}'
python-version: "${{ matrix.python-version }}"

- name: Step 3 - upgrade setuptools
run: pip3 install pytest nbmake wheel --upgrade setuptools
- name: Step 4 - Install aix360
run: pip3 install .

- name: Step 4 - Install aix360 with contrastive (CEM)
run: pip3 install .[contrastive]

- name: Step 5 - Test CEM MAF
run: python ./tests/contrastive/test_CEM_MAF.py

- name: Step 6 - Test CEM
run: python ./tests/contrastive/test_CEM.py

- name: Step 7 - Test Protodash
run: python ./tests/protodash/test_PDASH.py

- name: Step 8 - Test TED

# job to build default: ted algorithm on python 3.10.
build-ted-on-py310:
# The type of runner that the job will run on
runs-on: "${{ matrix.os }}"
strategy:
matrix:
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.10"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Step 1 - checkout aix360 repository
uses: actions/checkout@v3

- name: Step 2 - set up python version
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"

- name: Step 3 - upgrade setuptools
run: pip3 install pytest nbmake wheel --upgrade setuptools

- name: Step 4 - Install aix360. (Default installs ted algorithm related dependencies)
run: pip3 install .

- name: Step 5 - Test TED
run: python ./tests/ted/test_TED_Cartesian.py

- name: Step 9 - Test DIPVAE
run: python ./tests/dipvae/test_DIPVAE.py

- name: Step 10 - Test BRCG
run: python ./tests/rbm/test_Boolean_Rule_CG.py

- name: Step 11 - Test Linear Rule Regression
run: python ./tests/rbm/test_Linear_Rule_Regression.py

- name: Step 12 - Test Logistic Rule Regression
run: python ./tests/rbm/test_Logistic_Rule_Regression.py
# job to build matching algorithm on python 3.10.
build-matching-on-py310:
# The type of runner that the job will run on
runs-on: "${{ matrix.os }}"
strategy:
matrix:
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.10"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Step 1 - checkout aix360 repository
uses: actions/checkout@v3

- name: Step 2 - set up python version
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"

- name: Step 3 - upgrade setuptools
run: pip3 install pytest nbmake wheel --upgrade setuptools

- name: Step 13 - Test Matching Explainer
- name: Step 4 - Install matching algorithm related dependencies
run: pip3 install .[matching]

- name: Step 5 - Test Matching Explainer
run: python ./tests/matching/test_order_constraints.py

# - name: Step 14 - Test Rule Induction
# run: bash ./tests/rule_induction/test_rule_induction.sh
# job to build dipvae algorithm on python 3.10.
build-dipvae-on-py310:
# The type of runner that the job will run on
runs-on: "${{ matrix.os }}"
strategy:
matrix:
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.10"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Step 1 - checkout aix360 repository
uses: actions/checkout@v3

- name: Step 2 - set up python version
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"

- name: Step 3 - upgrade setuptools
run: pip3 install pytest nbmake wheel --upgrade setuptools

- name: Step 4 - Install aix360 with dipvae algorithm related dependencies
run: pip3 install .[dipvae]

- name: Step 15 - Test CoFrNet
- name: Step 5 - Test DIPVAE
run: python ./tests/dipvae/test_DIPVAE.py

# job to build cofrnet algorithm on python 3.10.
build-cofrnet-on-py310:
# The type of runner that the job will run on
runs-on: "${{ matrix.os }}"
strategy:
matrix:
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.10"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Step 1 - checkout aix360 repository
uses: actions/checkout@v3

- name: Step 2 - set up python version
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"

- name: Step 3 - upgrade setuptools
run: pip3 install pytest nbmake wheel --upgrade setuptools

- name: Step 4 - Install aix360 with cofrnet algorithm related dependencies
run: pip3 install .[cofrnet]

- name: Step 5 - Test CoFrNet
run: python ./tests/cofrnet/cofrnet_test.py

- name: Step 15b - Test CoFrNet Notebook
- name: Step 6 - Test CoFrNet Notebook
run: pytest --nbmake ./examples/cofrnet/cofrnet_example.ipynb

# job to build protodash algorithm on python 3.10.
build-protodash-on-py310:
# The type of runner that the job will run on
runs-on: "${{ matrix.os }}"
strategy:
matrix:
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.10"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Step 1 - checkout aix360 repository
uses: actions/checkout@v3

- name: Step 2 - set up python version
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"

- name: Step 3 - upgrade setuptools
run: pip3 install pytest nbmake wheel --upgrade setuptools

- name: Step 4 - Install aix360 with protodash algorithm related dependencies
run: pip3 install .[protodash]

- name: Step 5 - Test Protodash
run: python ./tests/protodash/test_PDASH.py

# job to build rbm algorithm on python 3.10.
build-rbm-on-py310:
# The type of runner that the job will run on
runs-on: "${{ matrix.os }}"
strategy:
matrix:
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.10"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Step 1 - checkout aix360 repository
uses: actions/checkout@v3

- name: Step 2 - set up python version
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"

- name: Step 3 - upgrade setuptools
run: pip3 install pytest nbmake wheel --upgrade setuptools

- name: Step 4 - Install aix360 with rbm algorithm related dependencies
run: pip3 install .[rbm]

- name: Step 5 - Test BRCG
run: python ./tests/rbm/test_Boolean_Rule_CG.py

- name: Step 6 - Test Linear Rule Regression
run: python ./tests/rbm/test_Linear_Rule_Regression.py

- name: Step 7 - Test Logistic Rule Regression
run: python ./tests/rbm/test_Logistic_Rule_Regression.py
53 changes: 44 additions & 9 deletions aix360/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@
from .mnist_dataset import MNISTDataset
from .meps_dataset import MEPSDataset
from .heloc_dataset import HELOCDataset
from .celeba_dataset import CelebADataset
from .cdc_dataset import CDCDataset
from .cifar_dataset import CIFARDataset
from .ted_dataset import TEDDataset
from .fashion_mnist_dataset import FMnistDataset
from .esnli_dataset import eSNLIDataset
try:
from .mnist_dataset import MNISTDataset
except:
pass

try:
from .meps_dataset import MEPSDataset
except:
pass

try:
from .heloc_dataset import HELOCDataset
except:
pass

try:
from .celeba_dataset import CelebADataset
except:
pass

try:
from .cdc_dataset import CDCDataset
except:
pass

try:
from .cifar_dataset import CIFARDataset
except:
pass

try:
from .ted_dataset import TEDDataset
except:
pass

try:
from .fashion_mnist_dataset import FMnistDataset
except:
pass

try:
from .esnli_dataset import eSNLIDataset
except:
pass
Loading