Skip to content

Releases

0.54.1

Choose a tag to compare

@CloseChoice CloseChoice released this 16 Oct 08:36

SHAP v0.54.1

Highlights

CUDA acceleration with shap-cuda

GPU support now lives in the separate shap-cuda package, providing the CUDA-accelerated backend for shap.GPUTreeExplainer. The GPU wheel workflow builds CUDA-enabled wheels and tests them on AWS GPU runners before publishing. By @CloseChoice in #5140.

The GPU TreeExplainer notebook has also been refreshed by @RAMitchell in #5220.

What's Changed

Enhancements

  • shap.plots.violin now accepts an ax argument and returns the axes, making it easier to customize plots and compose subplots. By @adt-kmr in #5218.

Maintenance

Documentation

  • Fix typos in the "An introduction to explainable AI" notebook. By @Yaqiao-chi-helen in #5225.
  • Fix typos in comments, docstrings, and an error message. By @guptaishaan in #5213.
  • Fix typos and replace the deprecated API reference in the LinearExplainer correlation notebook with maskers.Impute(data). By @ojuschugh1 in #5172.

New Contributors

Full Changelog: v0.53.0...v0.54.1

Full Changelog: v0.53.0...v0.54.1

0.53.0

Choose a tag to compare

@CloseChoice CloseChoice released this 09 Oct 06:44
6514e36

Highlights

  • Python 3.15 support: SHAP now builds wheels and runs tests against Python 3.15, including pre-releases. By @CloseChoice in #5143
  • Migration away from Numba and llvmlite: core utilities have been migrated to nanobind/C++, allowing Numba and llvmlite to be removed as required dependencies and enabling support for free-threaded Python. By @daidahao and @CloseChoice in #5081, #5082, #5088, #5089, #5090, #5091, #5092, #5117, #5129
  • GPU TreeSHAP improvements: LightGBM categorical GPU TreeSHAP support has been added, alongside TreeExplainer changes and CPU/GPU equivalence testing for categorical features. By @RAMitchell and @CloseChoice in #5020 and #5026
  • Additional build targets: add Windows ARM64 and Emscripten builds. By @ndabas and @CloseChoice in #5137 and #5162

What's Changed

Breaking changes

  • Match KernelExplainer DataFrame columns to the background by name. Duplicated column names now raise an error, but worked previously. By @Atishyy27 in #5164.

Fixes

  • Fix int16 overflow of node indices in independent TreeSHAP, which could cause segmentation faults for trees with more than 32,767 nodes. By @clark874 in #5163
  • Refactor short circuiting of tree_path_dependent SHAP calculation by @CloseChoice in #5069
  • Remove outdated TensorFlow version warnings from DeepExplainer by @SushantTusharJoshi in #5126

Enhancements

Other Changes

New Contributors

Full Changelog: v0.52.0...v0.53.0

v0.53.0rc0

Choose a tag to compare

@CloseChoice CloseChoice released this 07 Sep 07:13
64043a3

Highlights

  • Python 3.15.0rc2 support: SHAP now builds and runs tests against Python 3.15 pre-releases, including Python 3.15.0rc2. By @CloseChoice in #5143
  • Migration away from Numba and llvmlite: core utilities have been migrated to nanobind/C++, allowing Numba and llvmlite to be removed as required dependencies and enabling support for free-threaded Python. By @daidahao and @CloseChoice in #5081, #5082, #5088, #5089, #5090, #5091, #5092, #5117, #5129
  • GPU TreeSHAP improvements: LightGBM categorical GPU TreeSHAP support has been added, alongside TreeExplainer changes and CPU/GPU equivalence testing for categorical features. By @RAMitchell and @CloseChoice in #5020 and #5026

What's Changed

Fixes

Enhancements

Other Changes

New Contributors

Full Changelog: v0.52.0...v0.53.0rc0

v0.52.0

Choose a tag to compare

@CloseChoice CloseChoice released this 28 May 14:03
8461059

What's Changed

Highlights

  • Native bindings rewritten with nanobind, and the build system migrated
    from setup.py to scikit-build-core + CMake. The Cython
    _kernel_lib.pyx and the existing _cext / _cext_gpu modules are now
    built as nanobind extensions, and MANIFEST.in / setup.py have been
    removed in favor of a pyproject.toml-driven build. (#4366, by
    @CloseChoice and @daidahao and @claude)
  • Minimum dependency versions raised to follow SPEC 0. (#4310, by @CloseChoice)

Enhancements

Bug Fixes

  • Improve GPU TreeExplainer parity: preserve XGBoost default/missing child
    routing so NaN values follow the same branch as the source model, preserve
    vector-valued XGBoost base_score values (fixing multiclass additivity
    offsets), and tighten categorical handling so sklearn models with
    enable_categorical=True raise the existing unsupported-categorical error
    even when the booster does not expose feature_types. (#4997, by
    @RAMitchell)
  • TreeExplainer no longer crashes with pandas nullable dtypes.
    (#4298, by @tudstudent)
  • Fix NameError when with_binary=False and with_cuda=True by
    initializing compile_args. (#4322, by @mohityadav8)
  • Text plot colors render correctly by converting NumPy types to float.
    (#4332, by @Saloni-0465)
  • Assign the result of np.flipud so it is no longer a no-op in
    AdditiveForceArrayVisualizer. (#4343, by @Mahaveerjain-18)
  • Use isinstance() instead of is for type checks. (#4373, by @divyam-jha123)
  • Record 'sample' in Explanation.op_history instead of '__getitem__'.
    (#4376, by @tarun-227)
  • Move the unreachable large-dataset warning into the interventional branch.
    (#4392, by @Mahaveerjain-18)
  • Fix "structure of inputs doesn't match the expected structure".
    (#4410, by @shaivimalik)
  • Fix the return value from is_color_map() in plots/_beeswarm.py.
    (#4421, by @maniktyagi04)
  • Suppress the UserWarning when LGBMRegressor was fitted with feature
    names. (#4422, by @shaivimalik)
  • Correct max_evals calculation in PermutationExplainer.shap_values().
    (#4434, by @AftAb-25)
  • Fix incorrect measure calls in benchmark/metrics.py.
    (#4447, by @Jiya873)
  • Handle zero division in the heatmap when all SHAP values are zero.
    (#4449, by @BaibhavKundu2005)
  • Correct file path handling in make_dir (image.py).
    (#4501, by @Abhishek-Kumar-Rai5)
  • Use isinstance() instead of type() is for tuple checks.
    (#4508, by @neha222222)
  • Warn when the covariance matrix is singular in LinearExplainer.
    (#4471, by @BaibhavKundu2005)
  • Remove a debug print and a typo in serializable.
    (#4336, by @dhiraj-143r)

Maintenance

Type Hints

Tests

Documentation

New Contributors

Full Changelog: v0.51.0...v0.52.0

v0.51.0

Choose a tag to compare

@CloseChoice CloseChoice released this 04 Mar 09:04
03a6cd1

What's Changed

Fixes

  • fix: check first that the feature is not in the leaf node by @Far-naz in #4268
  • Fix missing array to scalar conversion in MAPLE by @Scienfitz in #4285
  • fix Python Version of Tree SHAP notebook by @CloseChoice in #4289
  • Fix path-dependent SHAP NaN with small background datasets by @tudstudent in #4272
  • Fix IndexError in format_value() when handling empty strings by @Copilot in #4238
  • Fix test_scatter_categorical for pandas 3.0 compatibility by @Copilot in #4253
  • Fix SamplingExplainer.explain for Series. by @ljw20180420 in #4200

Other Changes

New Contributors

Full Changelog: v0.50.0...v0.51.0

v0.50.0

Choose a tag to compare

@CloseChoice CloseChoice released this 11 Nov 18:24
e7277dc

What's Changed

New Contributors

Full Changelog: v0.49.1...v0.50.0

v0.49.1

Choose a tag to compare

@CloseChoice CloseChoice released this 14 Oct 09:19
9f9bbb8

What's Changed

Fix broken v0.49.0 release.

The previous Release wasn't properly published due to HTTP errors on MacOS.

v0.49.0

Choose a tag to compare

@CloseChoice CloseChoice released this 14 Oct 09:06
216c1ce

What's Changed

NOTE: this is the last release supporting Python 3.9 AND Python 3.10. From v0.50.0 onwards, we'll only support Python 3.11 and above.

  • Add support for categorical splits in C++ library by @nqviller in #4171
  • Add options to customize the color bar of the violin plot by @FanwangM in #4119

Other Changes

New Contributors

Full Changelog: v0.48.0...v0.49.0

v0.48.0

Choose a tag to compare

@CloseChoice CloseChoice released this 12 Jun 11:38
ea9e71f

What's Changed

Added

Documentation

  • Update Explaining a model that uses standardized features by @randombenj in #3903

Other Changes

New Contributors

Full Changelog: v0.47.2...v0.48.0

v0.47.2

Choose a tag to compare

@CloseChoice CloseChoice released this 17 Apr 18:00
fa8c184

What's Changed

Added

Other Changes

  • DOCS: clarity for partition tree explanation in Simple California Demo.ipynb by @ethanknights in #4027
  • FIX: unique value jitter by @fabianliebig in #4041
  • FIX: fix neutral language in SHAP value description by @Hrafz in #4058
  • FIX regression test for javascript plotting compontents and add tests by @CloseChoice in #4060

New Contributors

Full Changelog: v0.47.1...v0.47.2