Skip to content

Clashing versions in Google colab #2602

@divakaivan

Description

@divakaivan

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Google Colab
  2. Use a CPU runtime
  3. Try the below code
# cell 1
!pip install shap scikit-learn raiwidgets responsibleai
# cell 2 
!pip install --upgrade pandas
# cell 3
import shap
  1. See error

Stack trace

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-3-efbb001a1501>](https://localhost:8080/#) in <cell line: 0>()
----> 1 import shap

8 frames
[/usr/local/lib/python3.11/dist-packages/numpy/random/_pickle.py](https://localhost:8080/#) in <module>
----> 1 from .mtrand import RandomState
      2 from ._philox import Philox
      3 from ._pcg64 import PCG64, PCG64DXSM
      4 from ._sfc64 import SFC64
      5 

numpy/random/mtrand.pyx in init numpy.random.mtrand()

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Expected behavior
To import shap.

Screenshots

Image Image

Desktop (please complete the following information):

  • OS: Linux
  • Browser - Google Chrome
  • Python version: 3.11.12
  • raiwidgets and responsibleai package versions

raiwidgets==0.36.0
responsibleai==0.36.0

Not sure whose issue it is to be completely honest. Could be numpy/colab/shap/pandas/this lib.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions