Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup.py #1802

Closed
wants to merge 2 commits into from
Closed

Conversation

mkretsch327
Copy link

@mkretsch327 mkretsch327 commented Feb 5, 2021

Hi @slundberg,
First, I want to thank you for maintaining this project. It’s been incredibly useful over the last few years!

The initial motivation for this PR was the recent version bump of Numpy to v1.20.0, which coincided with a change to their C API (table of versions in numpy's source code).

A reproducible version of this issue is observed with the following:

  1. Install requirements in an empty virtual environment - pip install -r requirements.txt, with a requirements.txt of:
numpy==1.19.3
shap==0.36
  1. Once installation is finished, importing shap causes the following runtime error:
Python 3.8.5 (default, Sep  4 2020, 07:30:14) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import shap
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

This problem has manifested itself in the past when numpy's C api version has changed( link to mapping), and often manifests with the below error (taken from my stack trace), also seen in #382 and #381:

  File "/miniconda/envs/test_env/lib/python3.8/site-packages/shap/explainers/_tree.py", line 143, in __init__
    self.model = TreeEnsemble(model, self.data, self.data_missing, model_output)
  File "/miniconda/envs/test_env/lib/python3.8/site-packages/shap/explainers/_tree.py", line 825, in __init__
    self.trees = xgb_loader.get_trees(data=data, data_missing=data_missing)
  File "/miniconda/envs/test_env/lib/python3.8/site-packages/shap/explainers/_tree.py", line 1504, in get_trees
    trees.append(SingleTree({
  File "/miniconda/envs/test_env/lib/python3.8/site-packages/shap/explainers/_tree.py", line 1109, in __init__
    assert_import("cext")
  File "/miniconda/envs/test_env/lib/python3.8/site-packages/shap/utils/_general.py", line 23, in assert_import
    raise e
  File "/miniconda/envs/test_env/lib/python3.8/site-packages/shap/explainers/_tree.py", line 23, in <module>
    from .. import _cext
ImportError: numpy.core.multiarray failed to import

While it often is resolved by uninstalling and re-installing shap, I don't believe this prevents the issue from occurring in the first place, as such an installation is broken when leveraging a requirements.txt file.

The culprit appears to be the specification of numpy within the setup_requires argument of setup in setup.py.

The fix proposed here is to bound the numpy version to the latest stable release available at shap release time. In addition to fixing the above mentioned observed error, this will also help with the current behavior observed when installing an older version of shap in isolation. As an example, I'd expect shap==0.36 to be installed and setup against numpy 1.19.2 , but as of today, it's done against numpy 1.20.0`.

Look forward to hearing your thoughts and comments!

@codecov
Copy link

codecov bot commented Feb 5, 2021

Codecov Report

Merging #1802 (efeea94) into master (1bb8203) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1802      +/-   ##
==========================================
+ Coverage   50.99%   51.01%   +0.01%     
==========================================
  Files          88       88              
  Lines       12222    12258      +36     
==========================================
+ Hits         6233     6253      +20     
- Misses       5989     6005      +16     
Impacted Files Coverage Δ
shap/explainers/tf_utils.py 65.78% <0.00%> (-3.66%) ⬇️
shap/explainers/_permutation.py 89.01% <0.00%> (-2.66%) ⬇️
shap/explainers/_explainer.py 72.95% <0.00%> (-0.52%) ⬇️
shap/plots/_image.py 66.08% <0.00%> (-0.29%) ⬇️
shap/explainers/_kernel.py 89.54% <0.00%> (-0.19%) ⬇️
shap/maskers/_text.py 78.30% <0.00%> (-0.19%) ⬇️
shap/plots/_beeswarm.py 49.28% <0.00%> (-0.18%) ⬇️
shap/plots/_force.py 64.31% <0.00%> (ø)
shap/explainers/_gpu_tree.py 37.03% <0.00%> (ø)
shap/plots/_violin.py 20.87% <0.00%> (+0.05%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bb8203...efeea94. Read the comment docs.

@slundberg
Copy link
Collaborator

Thanks for digging into this! I am hesitant to lock in the numpy version since that will also effect people who build from source (in which case the cext will not be tied to the wrong numpy version). So I don't want to stop SHAP from working on the latest numpy when just a rebuild will do it. However, this is clearly something that would be good to clear up.

What about building a very informative error message for this case? That way people know to either rebuild SHAP or lower their numpy version.

@kbattocchi
Copy link

I believe that this issue is related to pypa/pip#9542 (and many other packages are similarly affected). I haven't been able to completely confirm it, but it sounds like perhaps the correct fix is to use oldest-supported-numpy instead of numpy as your build-time dependency.

Also note that there are other ways that this issue can manifest itself:

  • A user installed numpy a while ago and therefore has a version lower than 1.20 and now installs SHAP
  • A user installs some other package which depends on both SHAP and a version of numpy<1.20 (perhaps as a transitive dependency of a package such as tensorflow)

Another note: this only currently results in an error when SHAP is installed via a source distribution (so by default Windows users are spared from this, but there are no binary releases of SHAP for macOS or Linux), because the binary wheels for SHAP were built against numpy 1.19 (which is also forward compatible with numpy 1.20), while the source distribution will be built against the latest version of numpy even if the user has some other version of numpy installed locally already. However, if the binary wheels for a future release of SHAP are built against numpy 1.20, then I believe that even users of binary distributions will see this issue if they try to run while using numpy 1.19 locally (which again may be forced by some other package like tensorflow that the user has installed).

@mkretsch327
Copy link
Author

Thanks @kbattocchi ! I hadn't been aware of oldest-supported-numpy (or that other related pip issue). I've experimented on my setup with this suggestion, and I can no longer recreate the original issue.

@slundberg wdyt? I've update the PR to reflect this. I think there's loads of value in an informative warning as well if leaving setup.py as is, I think this would have to be raised wherever _cext is imported, correct?

@kbattocchi
Copy link

@mkretsch327 I couldn't repro your issue exactly as filed, but almost. After running pip install "numpy==1.19.3" shap, the following code:

import shap
import numpy as np
from sklearn.ensemble import RandomForestRegressor
shap.TreeExplainer(RandomForestRegressor(max_depth=4, n_estimators=10).fit(
    np.random.normal(size=(30, 6)), np.random.normal(size=(30,))))

fails with ImportError: numpy.core.multiarray failed to import, when run under python 3.7 or 3.8 on macOS or Linux.

That same code succeeds on all platforms when using a python 3.6 environment (where numpy 1.20 wasn't released, so the version of numpy that pip builds shap from source against is also 1.19 and everything is fine), and under Windows for python 3.7 and 3.8 (where binary wheels for shap are available).

The same code also succeeds when running pip install numpy shap instead of pinning the version of numpy; for some reason that I don't fully understand, installing with --no-binary shap also works on all platforms even when pinning the numpy version.

@mkretsch327
Copy link
Author

mkretsch327 commented Feb 16, 2021

@mkretsch327 I couldn't repro your issue exactly as filed, but almost. After running pip install "numpy==1.19.3" shap, the following code:

import shap
import numpy as np
from sklearn.ensemble import RandomForestRegressor
shap.TreeExplainer(RandomForestRegressor(max_depth=4, n_estimators=10).fit(
    np.random.normal(size=(30, 6)), np.random.normal(size=(30,))))

fails with ImportError: numpy.core.multiarray failed to import, when run under python 3.7 or 3.8 on macOS or Linux.

That same code succeeds on all platforms when using a python 3.6 environment (where numpy 1.20 wasn't released, so the version of numpy that pip builds shap from source against is also 1.19 and everything is fine), and under Windows for python 3.7 and 3.8 (where binary wheels for shap are available).

The same code also succeeds when running pip install numpy shap instead of pinning the version of numpy; for some reason that I don't fully understand, installing with --no-binary shap also works on all platforms even when pinning the numpy version.

I saw this ImportError too, I realize I only shared part of the stack trace initially, and not the actual error. I've updated my initial comment above.

@jklaise
Copy link
Contributor

jklaise commented Mar 26, 2021

The current setup.py behaviour is a blocker for installing tensorflow and shap in the same in the same environment as tensorflow pins numpy to 1.19.5 which causes the shap RuntimeError as it's built from source against latest 1.20 (example of the 2nd point raised by @kbattocchi). Would be keen to get this merged.

@mkretsch327
Copy link
Author

@slundberg Please let me know your thoughts on using oldest-supported-numpy here, and any thoughts on to best proceed.

@menewman
Copy link

We also ran into this issue while trying to install shap in the same environment as tensorflow (which pins numpy at 1.19.5), similar to what @jklaise described above. While we wait for this PR to be finalized, are there any suggested workarounds that can help?

@jklaise
Copy link
Contributor

jklaise commented May 21, 2021

@menewman the workaround is to install numpy first and then install shap (taking care that it doesn't install a pre-built version from cache), which will use the numpy version present in the evnironment to build shap. This may need 2 calls to pip install as I didn't find a way to define all deps in a way so that shap would be built against the correct numpy version.

@menewman
Copy link

menewman commented May 21, 2021

@jklaise - Ahhh, thank you. I will give that a shot! 🙏

EDIT: It looks like this works! Much appreciated.

@mkretsch327
Copy link
Author

@menewman the workaround is to install numpy first and then install shap (taking care that it doesn't install a pre-built version from cache), which will use the numpy version present in the evnironment to build shap. This may need 2 calls to pip install as I didn't find a way to define all deps in a way so that shap would be built against the correct numpy version.

This is what we needed to do as well.

@brandon-leapyear
Copy link

brandon-leapyear commented Jan 6, 2022

This is an old work account. Please reference @brandonchinn178 for all future communication


Any updates on this? This started failing again on Dec 31 2021, seemingly when numpy released 1.22 (although we have CI pinned to numpy 1.20, so I'm not sure why it started failing).

This comment is also relevant to this discussion: #1895 (comment)

@ashvinmanoj
Copy link

Any updates on this? This started failing again on Dec 31 2021, seemingly when numpy released 1.22 (although we have CI pinned to numpy 1.20, so I'm not sure why it started failing).

This comment is also relevant to this discussion: #1895 (comment)

I too have the same issue today and using numpy 1.20.3 and shap 0.39.0.
When we did restart API to pick new changes then it failed.

@Geeky-Ck5
Copy link

Any updates on this? This started failing again on Dec 31 2021, seemingly when numpy released 1.22 (although we have CI pinned to numpy 1.20, so I'm not sure why it started failing).
This comment is also relevant to this discussion: #1895 (comment)

I too have the same issue today and using numpy 1.20.3 and shap 0.39.0. When we did restart API to pick new changes then it failed.

Me too am facing the exact same error.

C extension was not built during install!
here
Traceback (most recent call last):
File "/./CreditScore.py", line 190, in
ex = shap.TreeExplainer(XGBoost_model)
File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 147, in init
self.model = TreeEnsemble(model, self.data, self.data_missing, model_output)
File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 827, in init
self.trees = xgb_loader.get_trees(data=data, data_missing=data_missing)
File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 1522, in get_trees
trees.append(SingleTree({
File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 1125, in init
assert_import("cext")
File "/usr/local/lib/python3.8/site-packages/shap/utils/_general.py", line 23, in assert_import
raise e
File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 23, in
from .. import _cext
ImportError: numpy.core.multiarray failed to import

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/uvicorn", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/uvicorn/main.py", line 362, in main
run(**kwargs)
File "/usr/local/lib/python3.8/site-packages/uvicorn/main.py", line 386, in run
server.run()
File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 49, in run
loop.run_until_complete(self.serve(sockets=sockets))
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 56, in serve
config.load()
File "/usr/local/lib/python3.8/site-packages/uvicorn/config.py", line 308, in load
self.loaded_app = import_from_string(self.app)
File "/usr/local/lib/python3.8/site-packages/uvicorn/importer.py", line 20, in import_from_string
module = importlib.import_module(module_str)
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/./CreditScore.py", line 225, in
print(traceback.format_exc(e))
File "/usr/local/lib/python3.8/site-packages/traceback2/init.py", line 185, in format_exc
return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain))
File "/usr/local/lib/python3.8/site-packages/traceback2/init.py", line 116, in format_exception
return list(TracebackException(
File "/usr/local/lib/python3.8/site-packages/traceback2/init.py", line 473, in init
self.stack = StackSummary.extract(
File "/usr/local/lib/python3.8/site-packages/traceback2/init.py", line 346, in extract
if limit is not None and pos >= limit:
TypeError: '>=' not supported between instances of 'int' and 'ImportError'

@Geeky-Ck5
Copy link

Any updates on this? This started failing again on Dec 31 2021, seemingly when numpy released 1.22 (although we have CI pinned to numpy 1.20, so I'm not sure why it started failing).
This comment is also relevant to this discussion: #1895 (comment)

I too have the same issue today and using numpy 1.20.3 and shap 0.39.0. When we did restart API to pick new changes then it failed.

Me too am facing the exact same error.

C extension was not built during install! here Traceback (most recent call last): File "/./CreditScore.py", line 190, in ex = shap.TreeExplainer(XGBoost_model) File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 147, in init self.model = TreeEnsemble(model, self.data, self.data_missing, model_output) File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 827, in init self.trees = xgb_loader.get_trees(data=data, data_missing=data_missing) File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 1522, in get_trees trees.append(SingleTree({ File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 1125, in init assert_import("cext") File "/usr/local/lib/python3.8/site-packages/shap/utils/_general.py", line 23, in assert_import raise e File "/usr/local/lib/python3.8/site-packages/shap/explainers/_tree.py", line 23, in from .. import _cext ImportError: numpy.core.multiarray failed to import

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/uvicorn", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in call return self.main(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/uvicorn/main.py", line 362, in main run(**kwargs) File "/usr/local/lib/python3.8/site-packages/uvicorn/main.py", line 386, in run server.run() File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 49, in run loop.run_until_complete(self.serve(sockets=sockets)) File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 56, in serve config.load() File "/usr/local/lib/python3.8/site-packages/uvicorn/config.py", line 308, in load self.loaded_app = import_from_string(self.app) File "/usr/local/lib/python3.8/site-packages/uvicorn/importer.py", line 20, in import_from_string module = importlib.import_module(module_str) File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 843, in exec_module File "", line 219, in _call_with_frames_removed File "/./CreditScore.py", line 225, in print(traceback.format_exc(e)) File "/usr/local/lib/python3.8/site-packages/traceback2/init.py", line 185, in format_exc return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain)) File "/usr/local/lib/python3.8/site-packages/traceback2/init.py", line 116, in format_exception return list(TracebackException( File "/usr/local/lib/python3.8/site-packages/traceback2/init.py", line 473, in init self.stack = StackSummary.extract( File "/usr/local/lib/python3.8/site-packages/traceback2/init.py", line 346, in extract if limit is not None and pos >= limit: TypeError: '>=' not supported between instances of 'int' and 'ImportError'

Steps that I have done,

I have installed Shap==0.39 seperately and then installed my requirement.txt packages.
Still same issue.
I have noticed that when doing pip download shap==0.39 it collects both numpy version 1.20 and numpy 1.22

2022-01-07T08:20:04.9291747Z Step 4/7 : RUN pip install shap==0.39.0
2022-01-07T08:20:05.1190132Z ---> Running in ce212a284f33
2022-01-07T08:20:05.1190473Z
2022-01-07T08:20:07.6953128Z �[91m�[0mCollecting shap==0.39.0
2022-01-07T08:20:09.3907558Z Downloading shap-0.39.0.tar.gz (356 kB)
2022-01-07T08:21:19.8728957Z Collecting numpy
2022-01-07T08:21:19.9404583Z Using cached numpy-1.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)

2022-01-07T08:21:20.9065652Z Collecting scipy
2022-01-07T08:21:21.1318305Z Downloading scipy-1.7.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.3 MB)
2022-01-07T08:23:37.5319071Z Collecting scikit-learn
2022-01-07T08:23:37.7571383Z Downloading scikit_learn-1.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (26.7 MB)
2022-01-07T08:25:10.6201181Z Collecting pandas
2022-01-07T08:25:10.8503263Z Downloading pandas-1.3.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)
2022-01-07T08:25:50.7967785Z Collecting tqdm>4.25.0
2022-01-07T08:25:51.0221622Z Downloading tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
2022-01-07T08:25:51.3310832Z Collecting slicer==0.0.7
2022-01-07T08:25:51.5570736Z Downloading slicer-0.0.7-py3-none-any.whl (14 kB)
2022-01-07T08:25:52.0337433Z Collecting numba
2022-01-07T08:25:52.2692723Z Downloading numba-0.54.1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.3 MB)
2022-01-07T08:26:03.5667674Z Collecting cloudpickle
2022-01-07T08:26:03.7921610Z Downloading cloudpickle-2.0.0-py3-none-any.whl (25 kB)
2022-01-07T08:26:03.8401827Z Requirement already satisfied: setuptools in /usr/local/lib/python3.8/site-packages (from numba->shap==0.39.0) (57.5.0)
2022-01-07T08:26:04.1413682Z Collecting llvmlite<0.38,>=0.37.0rc1
2022-01-07T08:26:04.3663211Z Downloading llvmlite-0.37.0-cp38-cp38-manylinux2014_x86_64.whl (26.3 MB)
2022-01-07T08:27:34.9249708Z Collecting numpy
2022-01-07T08:27:35.1537012Z Downloading numpy-1.20.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB)

2022-01-07T08:28:28.3512778Z Collecting pytz>=2017.3
2022-01-07T08:28:28.5769297Z Downloading pytz-2021.3-py2.py3-none-any.whl (503 kB)
2022-01-07T08:28:30.2918587Z Collecting python-dateutil>=2.7.3
2022-01-07T08:28:30.5165295Z Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
2022-01-07T08:28:31.3257972Z Collecting six>=1.5
2022-01-07T08:28:31.5500192Z Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
2022-01-07T08:28:31.7187216Z Collecting threadpoolctl>=2.0.0
2022-01-07T08:28:31.9431091Z Downloading threadpoolctl-3.0.0-py3-none-any.whl (14 kB)
2022-01-07T08:28:32.1144371Z Collecting joblib>=0.11
2022-01-07T08:28:32.3399902Z Downloading joblib-1.1.0-py2.py3-none-any.whl (306 kB)
2022-01-07T08:28:33.3621036Z Building wheels for collected packages: shap
2022-01-07T08:28:33.3631303Z Building wheel for shap (setup.py): started
2022-01-07T08:28:36.5564119Z Building wheel for shap (setup.py): finished with status 'done'
2022-01-07T08:28:36.5587178Z Created wheel for shap: filename=shap-0.39.0-cp38-cp38-linux_x86_64.whl size=502196 sha256=fb51025c9177331d9eaf55960884c4a82de95014040ba7095af00ce5cac419a7
2022-01-07T08:28:36.5588902Z Stored in directory: /root/.cache/pip/wheels/3d/c9/06/734ed80d6d61fad331974bf62017b4ea6b33488082b9f5e67e
2022-01-07T08:28:36.5627828Z Successfully built shap
2022-01-07T08:28:36.7672353Z Installing collected packages: six, numpy, threadpoolctl, scipy, pytz, python-dateutil, llvmlite, joblib, tqdm, slicer, scikit-learn, pandas, numba, cloudpickle, shap
2022-01-07T08:28:55.3606105Z Successfully installed cloudpickle-2.0.0 joblib-1.1.0 llvmlite-0.37.0 numba-0.54.1 numpy-1.20.3 pandas-1.3.5 python-dateutil-2.8.2 pytz-2021.3 scikit-learn-1.0.2 scipy-1.7.3 shap-0.39.0 six-1.16.0 slicer-0.0.7 threadpoolctl-3.0.0 tqdm-4.62.3
2022-01-07T08:28:55.3608500Z �[91mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
2022-01-07T08:28:55.6626560Z �[0m�[91mWARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
2022-01-07T08:28:55.6627681Z You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
2022-01-07T08:29:07.2550669Z �[0m ---> 74a75b30b60c
2022-01-07T08:29:07.8874574Z Removing intermediate container ce212a284f33
2022-01-07T08:29:07.8876055Z Step 5/7 : RUN pip install -r requirements.txt

@Geeky-Ck5
Copy link

Any updates on this? This started failing again on Dec 31 2021, seemingly when numpy released 1.22 (although we have CI pinned to numpy 1.20, so I'm not sure why it started failing).

This comment is also relevant to this discussion: #1895 (comment)

Hello, I managed to fix the issue by using the latest version of shap :)
Hope this can help you

@brandon-leapyear
Copy link

brandon-leapyear commented Jan 7, 2022

This is an old work account. Please reference @brandonchinn178 for all future communication


Any updates on this? This started failing again on Dec 31 2021, seemingly when numpy released 1.22 (although we have CI pinned to numpy 1.20, so I'm not sure why it started failing).
This comment is also relevant to this discussion: #1895 (comment)

Hello, I managed to fix the issue by using the latest version of shap :) Hope this can help you

Thanks, but unfortunately, we need to keep shap pinned to 0.39.0, so this won't work for us. It would be nice if this PR could be backported and have a 0.39.1 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants