jmschrei / pomegranate

Fast, flexible and easy to use probabilistic modelling in Python.
http://pomegranate.readthedocs.org/en/latest/
MIT License
3.29k stars 590 forks source link

"Bus Error: 10" on Attempting to Import pomegranate.distributions #1064

Open mencia opened 9 months ago

mencia commented 9 months ago

I am running MacOS Monterey on a MacBook Pro (13-inch, 2016, Two Thunderbolt 3 ports). I am using python3.9. My requirements.txt is:

numpy==1.24.3
ipykernel==6.23.0
matplotlib==3.7.1
imageio==2.31.1
imageio-ffmpeg==0.4.8
pomegranate==1.0.3

To reproduce error (Bus Error: 10), run the following:

import pomegranate.distributions

Any help?

jmschrei commented 9 months ago

I think this is a memory error: https://github.com/pytorch/pytorch/issues/2244

Is it possible you're not allocating enough memory? I don't have a Mac so I can't provide much help, but there are unit tests that complete on a Mac.

mencia commented 9 months ago

Is pomegranate compatible with python3.9?

jmschrei commented 9 months ago

Yes. https://github.com/jmschrei/pomegranate/actions/runs/5987534263/job/16241774762

mencia commented 9 months ago

I am out ideas :/ Let me know if someone figures it out. It is not to do with compatibilities since I get the same error if I create a venv with only pomegranate==1.0.3. Now I am getting Illegal instruction: 4, and as far as i am aware I have not changed anything.

jmschrei commented 9 months ago

Is it possible that you installed a version of PyTorch made to work with GPUs but you don't have a GPU?

mencia commented 9 months ago

I do not have a GPU. I have torch==2.0.1 installed. As far as I am aware it is suitable for CPU. pip freeze in my virtual environment lists the following packages:

appnope==0.1.3
apricot-select==0.6.1
asttokens==2.2.1
backcall==0.2.0
comm==0.1.3
contourpy==1.0.7
cycler==0.11.0
debugpy==1.6.7
decorator==5.1.1
executing==1.2.0
filelock==3.12.4
fonttools==4.39.4
imageio==2.31.1
imageio-ffmpeg==0.4.8
importlib-metadata==6.6.0
importlib-resources==5.12.0
ipykernel==6.23.0
ipython==8.13.2
jedi==0.18.2
Jinja2==3.1.2
joblib==1.3.2
jupyter_client==8.2.0
jupyter_core==5.3.0
kiwisolver==1.4.4
llvmlite==0.41.0
MarkupSafe==2.1.3
matplotlib==3.7.1
matplotlib-inline==0.1.6
mpmath==1.3.0
nest-asyncio==1.5.6
networkx==3.1
nose==1.3.7
numba==0.58.0
numpy==1.24.3
packaging==23.1
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.5.0
platformdirs==3.5.1
pomegranate==1.0.3
prompt-toolkit==3.0.38
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
Pygments==2.15.1
pyparsing==3.0.9
python-dateutil==2.8.2
pyzmq==25.0.2
scikit-learn==1.3.1
scipy==1.11.3
six==1.16.0
stack-data==0.6.2
sympy==1.12
threadpoolctl==3.2.0
torch==2.0.1
tornado==6.3.1
tqdm==4.66.1
traitlets==5.9.0
typing_extensions==4.5.0
wcwidth==0.2.6
zipp==3.15.0