samsledje / ConPLex

Adapting protein language models and contrastive learning for highly-accurate drug-target interaction prediction.
http://conplex.csail.mit.edu
MIT License
119 stars 32 forks source link

Invalid cuda device string #34

Closed DaniDelHoyo closed 9 months ago

DaniDelHoyo commented 9 months ago

🐛 Bug Report

When trying to make a prediction (on the test set) the CUDA device string is wrongly passed to torch in line 90 of ConPLex/conplex_dti/cli/predict.py : "cuda:{device_no}" . Seems like "device_no" is already a string containing the "cuda:" string, so when I removed that part ("cuda:") from said line 90, it worked.

Error:

File ".../ConPLex/conplex_dti/cli/predict.py", line 90, in main device = torch.device(f"cuda:{device_no}" if use_cuda else "cpu") RuntimeError: Invalid device string: 'cuda:cuda:0'

samsledje commented 9 months ago

Thanks for pointing this out, default value fixed in 0.1.11