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

[Orange v3.35][Explain] Explain Model encounters error and does not work #60

Closed
knyghtmare opened this issue Jun 25, 2023 · 10 comments · Fixed by #61
Closed

[Orange v3.35][Explain] Explain Model encounters error and does not work #60

knyghtmare opened this issue Jun 25, 2023 · 10 comments · Fixed by #61

Comments

@knyghtmare
Copy link

Hello,

I really like the orange data mining platform and its addons, and while exploring I have encountered a bug with the Explain add-on's "Explain Model' widget.

An error occurred.
module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

I have attached the file where I had encountered the error.
model_explain.zip

@PrimozGodec
Copy link
Collaborator

@knyghtmare, thank you for reporting. We are aware of this error, which originates in the library that we use SHAP. There is already a fix made in this library; we are just waiting for them to release.

In the meantime, you can solve the error by downgrading numpy to version <1.24. Please let me know how you installed Orange (installer, custom installation) and which operating system you use, and I can help you with downgrading Numpy.

@JustHayes
Copy link

@knyghtmare, thank you for reporting. We are aware of this error, which originates in the library that we use SHAP. There is already a fix made in this library; we are just waiting for them to release.

In the meantime, you can solve the error by downgrading numpy to version <1.24. Please let me know how you installed Orange (installer, custom installation) and which operating system you use, and I can help you with downgrading Numpy.

@PrimozGodec I'm having the same issue and installed using the standalone installer on windows 11

@PrimozGodec
Copy link
Collaborator

PrimozGodec commented Jun 29, 2023

@JustHayes, we thought it should not be a problem with a standalone installer since it originally packs an older version of numpy but it seems that numpy got updated in your case (maybe during some addon installation).

Can you try to solve the problem by opening the Orange command line (search through the search bar in the bottom toolbar)? Then run running conda install numpy<1.24.

SHAP maintainers promised to make a new release in the following week. Let's hope it really happens.

@knyghtmare
Copy link
Author

In the meantime, you can solve the error by downgrading numpy to version <1.24. Please let me know how you installed Orange (installer, custom installation) and which operating system you use, and I can help you with downgrading Numpy.

Hello,

Thank you for responding. I installed Orange Data Mining by downloading the standalone installer of v3.35.0 (for Windows 10) and then did the default installation. It also installed miniconda of 3.9.12 for me (my local python is latest of 3.10.x).

@JustHayes
Copy link

I encountered this error in another python environment and what I found is that conda was not able to successfully downgrade numpy and neither was pip. I was able to complete the numpy downgrade using mamba though (numpy 1.23.0 worked). Again, that is a separate environment, I have not tested in orange because I suspect pip corrupted the environment. If I am able to test in the orange environment I will report back.

@markotoplak
Copy link
Member

@JustHayes, we thought it should not be a problem with a standalone installer since it originally packs an older version of numpy but it seems that numpy got updated in your case (maybe during some addon installation).

@PrimozGodec, nope. I just checked this and the latest installer includes numpy 1.24.0. So this is a problem for all users who install the official packages.

@PrimozGodec
Copy link
Collaborator

I am reopening the issue since the SHAP wheels for arm64 (M1) on Macos still need to be included.

On all other platforms (Windows, Linux, MacOS-Intel), the addon should be fixed. We just released the new version of the addon, so for all that had problems with the addon, please upgrade the addon's version (wait an hour from posting of this comment for caches to update).

@PrimozGodec
Copy link
Collaborator

PrimozGodec commented Jul 10, 2023

Here a PR that will fix the addon installation for MacOS with M1/M2 chips: shap/shap#3078

@connortann
Copy link

shap just made a patch release 0.42.1, to include wheels for arm64 (thanks @PrimozGodec). I believe this should enable MacOS users to install a version that is compatible with numpy 1.42.

@PrimozGodec
Copy link
Collaborator

@connortann, thank you for the release.

Since SHAP now has also arm64 wheels, it works on M1/2 MacOS without having a compiler installed. To make sure that the newest SHAP is installed I upgraded the minimum version in #62.

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 a pull request may close this issue.

5 participants