MLBazaar / Cardea

An open source automl library for using machine learning in healthcare.

Home Page:https://mlbazaar.github.io/Cardea/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong numpy version?

vadi2 opened this issue · comments

  • Cardea version: 0.1.2
  • Python version: 3.8
  • Operating System: Ubuntu 20.04 LTS

Description

Having just installed pip3 and cardea onto the system for the first time, the tutorial wasn't quite working for me:

python3 load.py 
Traceback (most recent call last):
  File "load.py", line 1, in <module>
    from cardea import Cardea
  File "/home/vadi/.local/lib/python3.8/site-packages/cardea/__init__.py", line 11, in <module>
    from cardea.core import Cardea
  File "/home/vadi/.local/lib/python3.8/site-packages/cardea/core.py", line 20, in <module>
    from cardea.modeling import Modeler
  File "/home/vadi/.local/lib/python3.8/site-packages/cardea/modeling/__init__.py", line 3, in <module>
    from cardea.modeling.modeler import Modeler
  File "/home/vadi/.local/lib/python3.8/site-packages/cardea/modeling/modeler.py", line 6, in <module>
    import sklearn
  File "/home/vadi/.local/lib/python3.8/site-packages/sklearn/__init__.py", line 76, in <module>
    from .base import clone
  File "/home/vadi/.local/lib/python3.8/site-packages/sklearn/base.py", line 16, in <module>
    from .utils import _IS_32BIT
  File "/home/vadi/.local/lib/python3.8/site-packages/sklearn/utils/__init__.py", line 15, in <module>
    from .murmurhash import murmurhash3_32
  File "__init__.pxd", line 242, in init sklearn.utils.murmurhash
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

Some googling around showed that installing latest numpy should do it - cardea installed numpy 1.18.5. I installed the latest one, 1.20.2, and that made it work.

I see that the next step unfortunately doesn't work:

Exception has occurred: ContextualVersionConflict
(numpy 1.20.2 (/home/vadi/.local/lib/python3.8/site-packages), Requirement.parse('numpy<1.19.0,>=1.16.0'), {'tensorflow'})
  File "/media/vadi/SSDer/Programs/cardea/load.py", line 6, in <module>
    label_times = cardea.select_problem('MissedAppointment')

So a version upgrade is not the right solution.

Hi @vadi2 thank you for opening this issue!

Cardea runs on python 3.6 and 3.7 (we are still working on supporting 3.8). Can you try creating a separate environment with python 3.6 for cardea? If you are using Anaconda you can run the following

conda create -n cardea python=3.6 # or 3.7

Thanks for the reply! I've created the Anaconda environment successfully (still new to this), but how to I install cardea? https://anaconda.org/search?q=cardea lists now results, and this doesn't work either:

conda search cardea --info
Loading channels: done
No match found for: cardea. Search: *cardea*

No problem!

you can directly use pip to download cardea, after you create the virtual environment, activate it using conda activate cardea from there use pip install cardea

Thanks! That got it going.