"ModuleNotFoundError: No module named 'idisc'" when running test.py
AvidahRai opened this issue · comments
Hi thank you for your wonderful work and the zoo. I was performing benchmark evals on SOTA MDE models for my dissertation.
I tried to replicate your work in Google Colab (instead of conda) and when I run !python ./scripts/test.py --model-file ./idisc_nyu_resnet101.pt --config-file ./configs/nyu/nyu_r101.json --base-path ../temp/datasets
I get an error.
Traceback (most recent call last):
File "/content/idisc/./scripts/test.py", line 14, in <module>
import idisc.dataloders as custom_dataset
ModuleNotFoundError: No module named 'idisc'
I dont know why this is happening. My suspicion is !bash ./make.sh
is this because it threw low of exceptions but said "Finished processing dependencies for MultiScaleDeformableAttention==1.0
".
Your help is greatly appreciated.
Thank you for using our model, I believe that the main problem is that idisc
is not in the pythonpath.
You should do something like export PYTHONPATH="<IDISC-REPO_PATH>:${PYTHONPATH}"
before running the model (where <IDISC-REPO_PATH> is the to idisc dir like $HOME/Workspace/idisc
).
Thank you. export
command did not work on Goggle Colab. However, I did this.
import os
os.environ['PYTHONPATH'] = f"{os.getcwd()}:{os.environ.get('PYTHONPATH', '')}"
Also, I had to manually change /idisc/idisc/models/ops/make.sh
file on line 5
python setup.py build install --prefix $VIRTUAL_ENV
to
pip install -e .
Then I could finally run !bash ./make.sh
After doing that I was able to run the test.py code. I got the same results as stated without disparity.
E.g.
Thank you very much.
Hi, could you please share the Google Colab notebook you use?