Skip to content

Commit

Permalink
Explicit support for Regression, performed major refactoring of tests…
Browse files Browse the repository at this point in the history
…, removed unused code and updated notebooks to work (again). (#248)

This PR depends on the PR to be accepted:
#242

______

The PR fixes the following:

- Removed unused code and so partially fixed:
#245
- Updates all notebooks so they are all working:
#246
- Add explicit support for regressors and multiclass: :
#241 & :
#169
- Updated the yaml files for github actions. Now we have a weekly
cronjob (instead of daily) to test the notebooks.
- Enable tests which were previously failing or only enabled in certain
circumstances (much has changed the last 3 years with regards of
adoption of the Mac ARM architecture support)
- Removed most (if not all except one on purpose) of the copyright
notice in code.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
Reinier Koops and dependabot[bot] authored Apr 11, 2024
1 parent 77f303f commit ab672d4
Show file tree
Hide file tree
Showing 41 changed files with 33,296 additions and 8,897 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/cronjob_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Cron Test Dependencies

# Controls when the action will run.
# Everyday at 4:05
# See https://crontab.guru/#5_4_*_*_*
# Every sunday at 4:05
# See https://crontab.guru/#5 4 * * 0
on:
schedule:
- cron: "5 4 * * *"
- cron: "5 4 * * 0"

jobs:
run:
Expand All @@ -17,13 +17,10 @@ jobs:
include:
- build: macos
os: macos-latest
SKIP_LIGHTGBM: True
- build: ubuntu
os: ubuntu-latest
SKIP_LIGHTGBM: False
- build: windows
os: windows-latest
SKIP_LIGHTGBM: False
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@master
Expand All @@ -40,22 +37,17 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
env:
SKIP_LIGHTGBM: ${{ matrix.SKIP_LIGHTGBM }}
run: |
pip3 install --upgrade setuptools pip
pip3 install ".[all]"
- name: Run linters
env:
SKIP_LIGHTGBM: ${{ matrix.SKIP_LIGHTGBM }}
run: |
pre-commit install
pre-commit run --all-files
- name: Run (unit) tests
env:
SKIP_LIGHTGBM: ${{ matrix.SKIP_LIGHTGBM }}
TEST_NOTEBOOKS: 1
run: |
pytest --cov=probatus/binning --cov=probatus/metric_volatility --cov=probatus/missing_values --cov=probatus/sample_similarity --cov=probatus/stat_tests --cov=probatus/utils --cov=probatus/interpret/ --ignore==tests/interpret/test_inspector.py --cov-report=xml
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
pip3 install --upgrade setuptools pip
pip3 install ".[all]"
- name: Run unit tests and linters
env:
SKIP_LIGHTGBM: False
run: |
pytest
- name: Build package & publish to PyPi
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ jobs:
include:
- build: macos
os: macos-latest
SKIP_LIGHTGBM: True
- build: ubuntu
os: ubuntu-latest
SKIP_LIGHTGBM: False
- build: windows
os: windows-latest
SKIP_LIGHTGBM: False
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@master
Expand All @@ -39,23 +36,18 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
env:
SKIP_LIGHTGBM: ${{ matrix.SKIP_LIGHTGBM }}
run: |
pip3 install --upgrade setuptools pip
pip3 install ".[all]"
- name: Run linters
env:
SKIP_LIGHTGBM: ${{ matrix.SKIP_LIGHTGBM }}
run: |
pre-commit install
pre-commit run --all-files
- name: Run (unit) tests
env:
SKIP_LIGHTGBM: ${{ matrix.SKIP_LIGHTGBM }}
TEST_NOTEBOOKS: 1
TEST_NOTEBOOKS: 0
run: |
pytest --cov=probatus/binning --cov=probatus/metric_volatility --cov=probatus/missing_values --cov=probatus/sample_similarity --cov=probatus/stat_tests --cov=probatus/utils --cov=probatus/interpret/ --ignore==tests/interpret/test_inspector.py --cov-report=xml
pyflakes probatus
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing guide

`Probatus` aims to provide a set of tools that can speed up common workflows around validating binary classifiers and the data used to train them.
`Probatus` aims to provide a set of tools that can speed up common workflows around validating regressors & classifiers and the data used to train them.
We're very much open to contributions but there are some things to keep in mind:

- Discuss the feature and implementation you want to add on Github before you write a PR for it. On disagreements, maintainer(s) will have the final word.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

## Overview

**Probatus** is a python package that helps validate binary classification models and the data used to develop them. Main features:
**Probatus** is a python package that helps validate regression & (multiclass) classification models and the data used to develop them. Main features:

- [probatus.interpret](https://ing-bank.github.io/probatus/api/model_interpret.html) provides shap-based model interpretation tools
- [probatus.sample_similarity](https://ing-bank.github.io/probatus/api/sample_similarity.html) to compare two datasets using resemblance modelling, f.e. `train` with out-of-time `test`.
Expand Down
14,616 changes: 14,541 additions & 75 deletions docs/discussion/nb_rfecv_vs_shaprfecv.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit ab672d4

Please sign in to comment.