Code Monkey home page Code Monkey logo

Comments (7)

tuncadogan avatar tuncadogan commented on June 4, 2024

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.

from deepscreen.

yipy0010 avatar yipy0010 commented on June 4, 2024

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

from deepscreen.

tuncadogan avatar tuncadogan commented on June 4, 2024

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

from deepscreen.

yewmunyip avatar yewmunyip commented on June 4, 2024

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. :)

from deepscreen.

tuncadogan avatar tuncadogan commented on June 4, 2024

Thank you very much :)

from deepscreen.

yipy0010 avatar yipy0010 commented on June 4, 2024

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

from deepscreen.

tuncadogan avatar tuncadogan commented on June 4, 2024

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

from deepscreen.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.