From 93a99a7d6913b89908bbe0cf6fe5a371721932c5 Mon Sep 17 00:00:00 2001 From: Connor Tann <71127464+connortann@users.noreply.github.com> Date: Mon, 22 May 2023 10:36:20 +0100 Subject: [PATCH 1/9] Add overview of changes to README --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index af405dda3..684f4638a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,13 @@ This repository is a fork of Scott Lundberg's popular [shap](https://github.com/slundberg/shap) library. Unfortunately, the original shap repo is not currently maintained. This fork attempts to fix shap's current issues and merge old PRs. See the general discussion on the purpose of this repo [here](https://github.com/dsgibbons/shap/discussions/11). -**New contributors are very welcome**, so please feel free to get involved! +## What has changed on this fork? + +This fork primarily adds bug fixes and deprecation updates, to ensure that `shap` works with the latest versions of other libaries. Check out the [changelog](CHANGELOG.md) for full details of updates. + +## Contributing + +**New contributors are very welcome** so please feel free to get involved, for example by submitting PRs or opening issues! We are eager to build a broad pool of maintainers, to avoid having a single person responsible for the entire repostitory. This repo adopts a _liberal contribution governance model_, where project decisions are based on a consensus seeking process. For more information, see [here](https://medium.com/the-node-js-collection/healthy-open-source-967fa8be7951). From b9fdf2c5480c1d1b3a4a8cbf1b633d040e92b030 Mon Sep 17 00:00:00 2001 From: Connor Tann <71127464+connortann@users.noreply.github.com> Date: Mon, 22 May 2023 10:36:25 +0100 Subject: [PATCH 2/9] Add changelog --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..ac6dfa70e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,35 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## [Unreleased] + +### Added + +- Added `n_points` parameter to all functions in `shap.datasets` (#39). +- Added the ruff linter (#25, #26, #27). + +### Fixed + +- Fixed installation of package via setuptools (#51). +- Fixed failing unit tests (#29). +- Fixed deprecation warnings from `numpy` types (#7). +- Fixed deprecation warnings from `Ipython.core.display` (#13). +- Fixed deprecation warnings from `tensorflow` optimisers (#16). +- Fixed deprecation warnings from `sklearn.linear_model` (#22). + +### Changed + +- `shap.datasets` sampling changed to without replacement (#36). + +### Removed + +- Deprecated the Boston house price dataset (#38). +- Removed the unused `mimic.py` file (#53). + +## [0.41.0] - 2022-06-16 (parent repo) + +For details of previous changes, see the release page of the parent repository +[here](https://github.com/slundberg/shap/releases). From c3a91b0628f1ab92df209ba1000491243edc8ec8 Mon Sep 17 00:00:00 2001 From: Connor Tann <71127464+connortann@users.noreply.github.com> Date: Mon, 22 May 2023 10:52:18 +0100 Subject: [PATCH 3/9] Update log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac6dfa70e..053d81bf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fixed deprecation warnings from `Ipython.core.display` (#13). - Fixed deprecation warnings from `tensorflow` optimisers (#16). - Fixed deprecation warnings from `sklearn.linear_model` (#22). +- Fixed `plot.waterfall` yticklabels with boolean features (#58). ### Changed From a6d8dd90715be018d0cebe980bcb5a0de16d2f65 Mon Sep 17 00:00:00 2001 From: connortann <71127464+connortann@users.noreply.github.com> Date: Mon, 22 May 2023 21:35:48 +0100 Subject: [PATCH 4/9] Update CHANGELOG.md with suggested change Co-authored-by: Jeremy Goh <30731072+thatlittleboy@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 053d81bf5..d7c03ac7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Removed - Deprecated the Boston house price dataset (#38). -- Removed the unused `mimic.py` file (#53). +- Removed the unused `mimic.py` file and `MimicExplainer` code (#53). ## [0.41.0] - 2022-06-16 (parent repo) From c13763652316c1b2dac59e8241f2a82d902f59ff Mon Sep 17 00:00:00 2001 From: Connor Tann <71127464+connortann@users.noreply.github.com> Date: Tue, 23 May 2023 12:17:38 +0100 Subject: [PATCH 5/9] Define gitattributes to prevent merge conflicts --- .gitattributes | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..9bcf86e4a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Ensure consitent treatment of line endings +* text=auto + +# Do not raise merge conflicts for multiple changelog edits +CHANGELOG.md merge=union From 839f6022aea26c6cb1a8e73278158c7ae6e779e7 Mon Sep 17 00:00:00 2001 From: Connor Tann <71127464+connortann@users.noreply.github.com> Date: Tue, 23 May 2023 12:29:20 +0100 Subject: [PATCH 6/9] Add more detail, reorder --- CHANGELOG.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7c03ac7d..1f490f2af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,17 +13,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed -- Fixed installation of package via setuptools (#51). - Fixed failing unit tests (#29). -- Fixed deprecation warnings from `numpy` types (#7). -- Fixed deprecation warnings from `Ipython.core.display` (#13). -- Fixed deprecation warnings from `tensorflow` optimisers (#16). -- Fixed deprecation warnings from `sklearn.linear_model` (#22). - Fixed `plot.waterfall` yticklabels with boolean features (#58). +- Fixed sampling in `shap.datasets` to sample without replacement (#36). +- Fixed deprecation warnings for `numpy>=1.24` from numpy types (#7). +- Fixed deprecation warnings for `Ipython>=8` from `Ipython.core.display` (#13). +- Fixed deprecation warnings for `tensorflow>=2.11` from `tf.optimisers` (#16). +- Fixed deprecation warnings for `sklearn>=1.2` from `sklearn.linear_model` (#22). +- Fixed installation of package via setuptools (#51). ### Changed -- `shap.datasets` sampling changed to without replacement (#36). ### Removed From 0ae68c6589e54f86dea7dc05f5437362155c5559 Mon Sep 17 00:00:00 2001 From: Connor Tann <71127464+connortann@users.noreply.github.com> Date: Tue, 23 May 2023 12:33:33 +0100 Subject: [PATCH 7/9] More details of PRs --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f490f2af..f9cdda958 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed -- Fixed failing unit tests (#29). +- Fixed failing unit tests (#29, #20, #24). - Fixed `plot.waterfall` yticklabels with boolean features (#58). - Fixed sampling in `shap.datasets` to sample without replacement (#36). - Fixed deprecation warnings for `numpy>=1.24` from numpy types (#7). From b534715c377c7edd601c153973b8905e65cac829 Mon Sep 17 00:00:00 2001 From: connortann <71127464+connortann@users.noreply.github.com> Date: Tue, 23 May 2023 15:21:13 +0100 Subject: [PATCH 8/9] Add spacing suggestion Co-authored-by: Jeremy Goh <30731072+thatlittleboy@users.noreply.github.com> --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9cdda958..b0dc925c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,10 +16,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fixed failing unit tests (#29, #20, #24). - Fixed `plot.waterfall` yticklabels with boolean features (#58). - Fixed sampling in `shap.datasets` to sample without replacement (#36). -- Fixed deprecation warnings for `numpy>=1.24` from numpy types (#7). -- Fixed deprecation warnings for `Ipython>=8` from `Ipython.core.display` (#13). +- Fixed deprecation warnings for `numpy>=1.24` from numpy types (#7). +- Fixed deprecation warnings for `Ipython>=8` from `Ipython.core.display` (#13). - Fixed deprecation warnings for `tensorflow>=2.11` from `tf.optimisers` (#16). -- Fixed deprecation warnings for `sklearn>=1.2` from `sklearn.linear_model` (#22). +- Fixed deprecation warnings for `sklearn>=1.2` from `sklearn.linear_model` (#22). - Fixed installation of package via setuptools (#51). ### Changed From facd90dbadbc48b5d5bc180202d4acb356301293 Mon Sep 17 00:00:00 2001 From: Connor Tann <71127464+connortann@users.noreply.github.com> Date: Tue, 23 May 2023 15:24:40 +0100 Subject: [PATCH 9/9] Typo fix --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 9bcf86e4a..9b15d1007 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# Ensure consitent treatment of line endings +# Ensure consistent treatment of line endings * text=auto # Do not raise merge conflicts for multiple changelog edits