pandas-ml-quant icon indicating copy to clipboard operation
pandas-ml-quant copied to clipboard

Cuda

Open Bturan19 opened this issue 3 years ago • 3 comments

Thanks for this awesome project firstly.

I wonder if its possible to fit a model on GPU.

In predict method I see that there is a cuda parameter but couldnt find it in fit parameter.

Thanks in advance

Bturan19 avatar Sep 08 '21 16:09 Bturan19

I have never really tested cuda since I don't have an nvidia any more. so without any guarantee it should be good enough to just pass cuda=True to the kwargs of your fit function.

with df.model() as m:
  m.fit(....., cuda=True)

KIC avatar Sep 09 '21 07:09 KIC

Thanks for answer. It didn't work just like that because all the data was in cpu. Some additional work is needed there I guess

Bturan19 avatar Sep 09 '21 09:09 Bturan19

Since I don't have a cuda gpu at the moment you might try to fix it yourself and submit a PR. It should not be too complicated as there are not many places for data conversion. it is utils.from_pandas or utils.to_device which might miss the flag.

KIC avatar Sep 13 '21 06:09 KIC