neural-backed-decision-trees
neural-backed-decision-trees copied to clipboard
error when use 'nbdt-hierarchy'
when run command 'nbdt-hierarchy' in ubuntu 18.04 nbdt-hierarchy --checkpoint=wrn28_10_cifar10 --dataset=CIFAR10 nbdt-hierarchy --vis-sublabels --vis-zoom=1.25 --dataset=CIFAR10 --arch=wrn28_10_cifar10 Here is ModuleNotFoundError: No module named 'nbdt.thirdparty', I wonder what happened
Is your system default python3? I just tried pip install nbdt (installing nbdt-0.0.4) and nbdt-hierarchy --help works for me on Ubuntu 18.04. However, I ran this from within a conda environment with a python3 default.
Is your system default python3? I just tried
pip install nbdt(installingnbdt-0.0.4) andnbdt-hierarchy --helpworks for me on Ubuntu 18.04. However, I ran this from within a conda environment with a python3 default.
Traceback (most recent call last): File "/data/anaconda3/bin/nbdt-hierarchy", line 7, in exec(compile(f.read(), file, 'exec')) File "/data/M808/zhuyi/NBDTNemaTest/nbdt/bin/nbdt-hierarchy", line 5, in from nbdt.thirdparty.wn import maybe_install_wordnet ModuleNotFoundError: No module named 'nbdt.thirdparty'
It's the full error tips
Thanks for your traceback, but same question -- is your environment using python2 or python3? I was able to setup the repository inside a conda environment with python3 successfully, using the below:
conda create -n nbdt python=3.7
git clone [email protected]:alvinwan/neural-backed-decision-trees.git # or use https to clone
cd neural-backed-decision-trees
python setup.py develop
nbdt-hierarchy --help
Thanks for your traceback, but same question -- is your environment using python2 or python3? I was able to setup the repository inside a conda environment with python3 successfully, using the below:
conda create -n nbdt python=3.7 git clone [email protected]:alvinwan/neural-backed-decision-trees.git # or use https to clone cd neural-backed-decision-trees python setup.py develop nbdt-hierarchy --help
Pre-use is python3.8,torch 1.8 and torchvision 0.9, I changed it to python3.7,torch1.6,and torchvision 0.7, now it works!
But there still an unexpected question,
using command nbdt-wnids --dataset=CIFAR10,
error tips,
Traceback (most recent call last):
File "/data/anaconda3/envs/nbdt/bin/nbdt-wnids", line 7, in
there is no attribute 'keys' in custom.py