facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
2.97k stars 586 forks source link

Missing CUDA availability check in ESM-1v example #688

Open ebeurer opened 1 month ago

ebeurer commented 1 month ago

In examples/variant-prediction/predict.py, there are some instances where CUDA is used without checking availability (and the nogpu argument), namely lines 142, 175, 194 and 212.

In line 155 those checks are performed before using CUDA, which leads me to believe the code is intended to also work when using only a CPU.