Skip to content

Commit

Permalink
Merge pull request easybuilders#18931 from boegel/20231006105033_new_…
Browse files Browse the repository at this point in the history
…pr_SHAP0421

{data}[foss/2019b] SHAP v0.42.1 w/ Python 3.7.4
  • Loading branch information
smoors authored Oct 10, 2023
2 parents 6b46101 + 99f479a commit c010dfe
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
easyblock = 'PythonBundle'

name = 'SHAP'
version = '0.42.1'
versionsuffix = '-Python-%(pyver)s'

homepage = "https://github.com/slundberg/shap"
description = """SHAP (SHapley Additive exPlanations) is a game theoretic approach to explain the output of any
machine learning model. It connects optimal credit allocation with local explanations using the classic Shapley
values from game theory and their related extensions."""

toolchain = {'name': 'foss', 'version': '2019b'}

dependencies = [
('Python', '3.7.4'),
('SciPy-bundle', '2019.10', versionsuffix),
('scikit-learn', '0.21.3', versionsuffix),
('tqdm', '4.41.1'),
('numba', '0.47.0', versionsuffix),
]

sanity_pip_check = True
use_pip = True

# ignore too strict requirement for 'packaging' Python package
local_preinstallopts = "sed -i 's/packaging>[0-9.]*/packaging/g' pyproject.toml && "
# fix compatibility with numba 0.47.0
local_preinstallopts += "sed -i 's/from numba.core.errors import/from numba.errors import/g' shap/maskers/_image.py && "

exts_list = [
# recent setuptools required to avoid UNKNOWN and 0.0.0 in SHAP installation
('setuptools', '67.8.0', {
'checksums': ['62642358adc77ffa87233bc4d2354c4b2682d214048f500964dbe760ccedf102'],
}),
('cloudpickle', '2.2.1', {
'checksums': ['d89684b8de9e34a2a43b3460fbca07d09d6e25ce858df4d5a44240403b6178f5'],
}),
('slicer', '0.0.7', {
'checksums': ['f5d5f7b45f98d155b9c0ba6554fa9770c6b26d5793a3e77a1030fb56910ebeec'],
}),
(name, version, {
'sources': [SOURCELOWER_TAR_GZ],
'checksums': ['64403915e4a07d2951e7eee4af0e835b1b519367b11806fe1aa4bd6d81adb626'],
'preinstallopts': local_preinstallopts,
}),
]

moduleclass = 'data'
2 changes: 1 addition & 1 deletion test/easyconfigs/easyconfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def check_dep_vars(self, gen, dep, dep_vars):
'LLVM': [
# numba 0.47.x requires LLVM 7.x or 8.x (see https://github.com/numba/llvmlite#compatibility)
(r'8\.', [r'numba-0\.47\.0-', r'librosa-0\.7\.2-', r'BirdNET-20201214-',
r'scVelo-0\.1\.24-', r'PyTorch-Geometric-1\.[346]\.[23]']),
r'scVelo-0\.1\.24-', r'PyTorch-Geometric-1\.[346]\.[23]', r'SHAP-0\.42\.1']),
(r'10\.0\.1', [r'cell2location-0\.05-alpha-', r'cryoDRGN-0\.3\.2-', r'loompy-3\.0\.6-',
r'numba-0\.52\.0-', r'PyOD-0\.8\.7-', r'PyTorch-Geometric-1\.6\.3',
r'scanpy-1\.7\.2-', r'umap-learn-0\.4\.6-']),
Expand Down

0 comments on commit c010dfe

Please sign in to comment.