Illegal Operation when importing TabularPrediction
See original GitHub issueWhen I try to import anything from AutoGluon, I get “Illegal instruction (core dumped)” from a py script. In a jupyter notebook, I get a dead kernel and nothing runs. I am running Ubuntu 18.04, followed the github installation instructions, and have executed my script and notebooks with only the import code.
I have installed using pip (see below) without error message when installing. I have also ran the set up script from the git clone with the “install” and “develop” arguments and got these errors: No local packages or working download links found for autogluon.vision==0.0.16b20201221 error: Could not find suitable distribution for Requirement.parse(‘autogluon.vision==0.0.16b20201221’)
Installation:
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade "mxnet<2.0.0"
python3 -m pip install --pre autogluon
Code:
import autogluon as ag
from autogluon import TabularPrediction as task
Freeze: asn1crypto==0.24.0 attrs==20.3.0 Automat==0.6.0 backcall==0.2.0 blinker==1.4 botocore==1.19.40 catboost==0.24.3 certifi==2020.12.5 cffi==1.14.4 chardet==4.0.0 click==7.1.2 cloud-init==20.3 cloudpickle==1.6.0 colorama==0.3.7 command-not-found==0.3 configobj==5.0.6 constantly==15.1.0 contextvars==2.4 cryptography==2.1.4 cycler==0.10.0 Cython==0.29.21 dask==2020.12.0 decorator==4.4.2 distro-info===0.18ubuntu0.18.04.1 flake8==3.8.4 gluoncv==0.8.0 graphviz==0.8.4 HeapDict==1.0.1 httplib2==0.9.2 hyperlink==17.3.1 idna==2.10 immutables==0.14 incremental==16.10.1 iniconfig==1.1.1 ipykernel==5.4.2 ipython==7.19.0 ipython-genutils==0.2.0 jedi==0.17.2 Jinja2==2.10 jmespath==0.10.0 joblib==1.0.0 jsonpatch==1.16 jsonpointer==1.10 jsonschema==2.6.0 jupyter-client==5.2.2 jupyter-core==4.4.0 keyring==10.6.0 keyrings.alt==3.0 kiwisolver==1.3.1 language-selector==0.1 liac-arff==2.5.0 lightgbm==3.1.1 llvmlite==0.35.0 MarkupSafe==1.0 matplotlib==3.3.3 mccabe==0.6.1 msgpack==1.0.2 mxnet==1.6.0 netifaces==0.10.4 networkx==2.5 numba==0.52.0 numpy==1.19.4 oauthlib==2.0.6 openml==0.11.0 packaging==20.8 PAM==0.4.2 pandas==1.1.5 parso==0.7.1 pexpect==4.8.0 pickleshare==0.7.5 Pillow==6.2.1 plotly==4.14.1 pluggy==0.13.1 portalocker==2.0.0 prompt-toolkit==3.0.8 psutil==5.8.0 ptyprocess==0.6.0 py==1.10.0 pyaml==20.4.0 pyarrow==1.0.0 pyasn1==0.4.2 pyasn1-modules==0.2.1 pycodestyle==2.6.0 pycparser==2.20 pycrypto==2.6.1 pyflakes==2.2.0 Pygments==2.7.3 pygobject==3.26.1 PyJWT==1.5.3 PyNaCl==1.4.0 pyOpenSSL==17.5.0 pyparsing==2.4.7 pyserial==3.4 pytest==6.2.1 python-apt==1.6.5+ubuntu0.4 python-dateutil==2.8.1 python-debian==0.1.32 pytz==2020.4 pyxdg==0.25 PyYAML==5.3.1 pyzmq==16.0.2 regex==2020.11.13 requests==2.25.1 requests-unixsocket==0.1.5 retrying==1.3.3 s3transfer==0.3.3 sacrebleu==1.4.14 sacremoses==0.0.43 scikit-learn==0.23.2 scikit-optimize==0.8.1 scipy==1.5.4 screen-resolution-extra==0.0.0 SecretStorage==2.3.1 sentencepiece==0.1.94 service-identity==16.0.0 six==1.15.0 sortedcontainers==2.3.0 ssh-import-id==5.7 systemd-python==234 tblib==1.7.0 threadpoolctl==2.1.0 thrift==0.13.0 tokenizers==0.8.1 toml==0.10.2 toolz==0.11.1 tornado==6.1 tqdm==4.54.1 traitlets==4.3.2 Twisted==17.9.0 typing==3.7.4.3 ufw==0.36 unattended-upgrades==0.1 urllib3==1.26.2 wcwidth==0.2.5 xkit==0.0.0 xmltodict==0.12.0 yacs==0.1.8 zict==2.0.0 zope.interface==4.3.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
@Innixma @ppunyst I reinstalled ubuntu (both 18.04 and 20.04) and tried on fresh virtual environments. When installing from pip3, I always got an “Illegal instruction (core dumped)” error when I called import autogluon. I also got the same error when calling
import mxnet
from python3. This led me to believe there was an issue with mxnet, though I was using the required mxnet 1.7.0 version. I suspect the main issue is that I am using an older CPU (Xeon Processor E5-2670 from 2012) and the code needs to be compiled for this CPU.Solution: I had to build both mxnet (1.7.0) and autogluon (0.0.15) on fresh installations of Ubuntu 18.04, using python3.6.9.
Here are my exact steps:
Build mxnet 1.7.0
sudo apt-get update sudo apt-get install -y build-essential git ninja-build ccache libopenblas-dev libopencv-dev cmake sudo apt install gfortran sudo apt-get install python3-pip python3 -m pip install --user --upgrade “cmake>=3.13.2” Download and untar mxnet 1.7.0 to incubator-mxnet cd incubator-mxnet make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas
export LD_LIBRARY_PATH=$PWD/lib cd python pip3 install -e . pip3 install graphviz
Build autogluon 0.0.15
cd ~ wget https://files.pythonhosted.org/packages/be/d9/a540c12f965cd9f0fe587b983e4bb5a6fb1854da408b04410b60f047f46f/autogluon-0.0.15.tar.gz tar -xf autogluon-0.0.15.tar.gz pip3 install cython pip3 install scipy pip3 install pandas cd autogluon sudo python3 setup.py develop
Test in python3 -
Note: 0.0.15 has a slightly different API than 0.0.16
python3 from autogluon import TabularPrediction as task
Trace on pip and python appears. Add a line after the first import’s “;”
sudo nano /usr/local/lib/python3.6/dist-packages/autogluon-nspkg.pth
@Innixma