qiime2 / q2-sample-classifier

QIIME 2 plugin for machine learning prediction of sample data.
BSD 3-Clause "New" or "Revised" License
7 stars 36 forks source link

ENH : add support for GPU accelerated classifiers #207

Open mortonjt opened 3 years ago

mortonjt commented 3 years ago

Improvement Description It could be nice to had support for models that can be loaded on the GPU. There are a number of libraries such as Pytorch / cuML / skorch that make this pretty easy to implement.

Current Behavior All of the existing methods are CPU bound, which can become a bottleneck when performing many predictions.

Proposed Behavior Many of the classifiers in this package already have GPU implementations in skorch / cuML. It would just be a matter of adding the appropriate dependencies / checks / flags to make sure that everything can run.

References

  1. Pytorch : https://pytorch.org/
  2. cuML : https://github.com/rapidsai/cuml
  3. skorch : https://github.com/skorch-dev/skorch
valentynbez commented 1 year ago

I wonder if that's really needed. qiime2 is limited in that regard, and introducing pytorch or cuML as an additional huge dependency for the package defies the purpose. Users unfamiliar with ML will use it on a low n of samples, advanced ML practitioners will start with scikit-learn or pytorch directly.