DNABERT_2 icon indicating copy to clipboard operation
DNABERT_2 copied to clipboard

Suggest better error message than 'assert q.is_cuda and k.is_cuda and v.is_cuda'

Open richelbilderbeek opened this issue 1 year ago • 2 comments

Multiple issues (#11, #20, #34, #96) mention the same error:

assert q.is_cuda and k.is_cuda and v.is_cuda

#96 mentions a solution, from the author of this code:

please try pip uninstall triton and run the code again.

From that I'd like to conclude that code is run that expects Triton to be absent. Hence I suggest to make the error message more explicit:

Error: you are running code that expects Triton to be absent. Please uninstall Triton (`pip uninstall triton`) and run again.

In that way, us users know better what to do :-)

Of course, I may be wrong in interpreting what the error message should be. That shows the need to improve that error message even more :+1:

richelbilderbeek avatar Sep 09 '24 06:09 richelbilderbeek

Also here is a reproducible error, that only installs DNABERT 2, then runs the example script.

richelbilderbeek avatar Sep 11 '24 12:09 richelbilderbeek

The error is incorrect. It should be:

Error: you are running code that uses Triton on hardware that does not support CUDA, i.e. not using NVIDIA hardware.

To run this code on regular CPUs uninstall Triton, e.g. with `pip uninstall triton` and run again.

richelbilderbeek avatar Sep 12 '24 08:09 richelbilderbeek