cansyl/DEEPScreen

Receiving "There was a problem during..." Error

yipy0010 opened this issue · 7 comments

Hi, I was trying out the steps listed in the README.md. But I realised the main_training.py is in the BIN folder. And if I enter the folder and run it, I get both the "There was a problem during..." error messages. Must I move the scripts out of the BIN folder for the command to work?

Hi, do not cd into the bin folder and do not relocate the scripts please. Instead, run the command as:

python bin/main_training.py ...

This should solve the problem. Als, you should activate your conda environment before running the command.

Hi, thanks for the quick reply. I realised it's a problem with using gpu. Apparently, if I comment out the line and force the script to use only CPU, there are no error messages, but when I use gpu, the error messages appear.

I commented out the try and except in main_training.py at lines 143-146. And when I run it with gpu, it gave the following error:
(deepscreen_env) travecta@travecta-desktop:~/Documents/DEEPScreen$ python bin/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
Namespace(bs=64, dropout=0.25, en='my_chembl286_training', epoch=100, fc1=256, fc2=128, lr=0.01, model='CNNModel1', targetid='CHEMBL286')
Arguments: CHEMBL286-CNNModel1-256-128-0.01-64-0.25-100-my_chembl286_training
GPU is available on this device!
Epoch :0
Training mode: True
Epoch 0 training loss: 23.987353682518005
Traceback (most recent call last):
File "bin/main_training.py", line 67, in
args.dropout, args.epoch, args.en)
File "/home/travecta/Documents/DEEPScreen/bin/train_deepscreen.py", line 144, in train_validation_test_training
training_perf_dict = prec_rec_f1_acc_mcc(all_training_labels, all_training_preds)
File "/home/travecta/Documents/DEEPScreen/bin/evaluation_metrics.py", line 10, in prec_rec_f1_acc_mcc
precision = metrics.precision_score(y_true, y_pred)
File "/home/travecta/anaconda3/envs/deepscreen_env/lib/python3.7/site-packages/sklearn/utils/validation.py", line 73, in inner_f
return f(**kwargs)
File "/home/travecta/anaconda3/envs/deepscreen_env/lib/python3.7/site-packages/sklearn/metrics/_classification.py", line 1623, in precision_score
zero_division=zero_division)
File "/home/travecta/anaconda3/envs/deepscreen_env/lib/python3.7/site-packages/sklearn/utils/validation.py", line 73, in inner_f
return f(**kwargs)
File "/home/travecta/anaconda3/envs/deepscreen_env/lib/python3.7/site-packages/sklearn/metrics/_classification.py", line 1434, in precision_recall_fscore_support
pos_label)
File "/home/travecta/anaconda3/envs/deepscreen_env/lib/python3.7/site-packages/sklearn/metrics/_classification.py", line 1250, in _check_set_wise_labels
y_type, y_true, y_pred = _check_targets(y_true, y_pred)
File "/home/travecta/anaconda3/envs/deepscreen_env/lib/python3.7/site-packages/sklearn/metrics/_classification.py", line 98, in _check_targets
raise ValueError("{0} is not supported".format(y_type))
ValueError: unknown is not supported

Thank you for posting the error we will check it and comment when we have a solution.

Okay, thanks for looking into the matter! In the meantime, I will look into the code and will propose a solution if I found any as well. :)

Thank you very much :)

Hi Prof Dogan, I have resolved the error. Please see the attached evaluation_metrics.py. I very much enjoy this work of yours. :)
evaluation_metrics.zip

That is great! thanks! we will examine your changes and apply it if nothing goes wrong