Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError: local variable 'best_test_performance_dict' referenced before assignment #6

Closed
hmkim opened this issue Dec 1, 2020 · 4 comments

Comments

@hmkim
Copy link

hmkim commented Dec 1, 2020

Hi!

python main_training.py --targetid CHEMBL286 --model CNNModel1 --fc1 256 --fc2 128 --lr 0.01 --bs 64 --dropout 0.25 --epoch 100 --en my_chembl286_training

스크린샷 2020-12-01 오후 3 24 09

For the tutorial (e.g train step), I can't run the code normally.
Could you check this, please?

@tuncadogan
Copy link
Collaborator

Hi, unfortunately, I could not reproduce your error, it is running fine in our tests. Are you following the instructions provided in the readme before executing the command? In which platform you are running the code?

@hmkim
Copy link
Author

hmkim commented Dec 3, 2020

Hi @tuncadogan

$ conda create -n deepscreen_env python=3.7
$ conda activate deepsceren_env
$ git clone https://github.com/cansyl/DEEPScreen.git
$ cd bin
$ pip install -r requirements.txt
$ pip install torch==1.7.0+cu101 torchvision==0.8.1+cu101 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html # for GPU
$ python main_training.py --targetid CHEMBL286 --model CNNModel1 --fc1 256 --fc2 128 --lr 0.01 --bs 64 --dropout 0.25 --epoch 100 --en my_chembl286_training

Ubuntu 18.04.4 LTS

@tuncadogan
Copy link
Collaborator

I checked the problem again given the information, it most probably is related to the additional libraries you install. From the messages:

"There was a problem during training performance calculation!"
"There was a problem during validation performance calculation!"
"There was a problem during test performance calculation!"

it is evident that predictions could not be calculated at all (for any of the epochs), indicating a problem related to torch. Please try again, this time without installing those additional libraries.

@hmkim
Copy link
Author

hmkim commented Dec 8, 2020

스크린샷 2020-12-08 오전 9 39 13

On your guide, there is no problem!

conda create -n deepscreen_env python=3.7
source activate deepscreen_env
pip install -r requirements.txt

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants