dangnh0611 / kaggle_rsna_breast_cancer

1st place solution of RSNA Screening Mammography Breast Cancer Detection competition on Kaggle: https://www.kaggle.com/competitions/rsna-breast-cancer-detection
MIT License
79 stars 26 forks source link

Problems with importing timm/albumentations #1

Closed taijizhao closed 1 year ago

taijizhao commented 1 year ago

Congratulations on winning the competition and thank you very much for sharing the awesome repository! I am trying to follow your work and replicating the convnext training process. The datasets preparation went fine but I got stuck in running sh ./_train_script_auto_generated.sh and got the error: ImportError: src/pytorch-image-models/projects/rsna/exps/exp7_fully_reproduce.py doesn't contains class named 'Exp' It seems that exp7_fully_reproduce.py cannot import timm and albumentations correctly.

I did not use the provided docker but manually pip installed the packages following the docker file. should I pip install -e the pytorch-image-models and albumentations in the src folder?
Thank you very much!

dangnh0611 commented 1 year ago

It seems that the Python interpreter can't find timm and albumentations package/module which located in src/pytorch-image-models. You can try:

export PYTHONPATH=$(pwd)/src/pytorch-image-models/:$PYTHONPATH

before running the train command. Or, add it directly to train command like:

PYTHONPATH=$(pwd)/src/pytorch-image-models/:$PYTHONPATH  python3 train_exp.py

Of course, your method pip install -e should also work as well Hope it helps !

taijizhao commented 1 year ago

Thank you very much for the reply! Problem solved. Have a nice day!