pyod icon indicating copy to clipboard operation
pyod copied to clipboard

Can GPU be used during trainning?

Open lk1983823 opened this issue 5 years ago • 6 comments

Can GPU be used during trainning such as XGBOD ? Thank you !

lk1983823 avatar Feb 10 '19 08:02 lk1983823

Hi Frank,

Unfortunately, most pyod models are not compatible with GPU computation. XGBOD itself actually would not benefit from GPU too much as the most expensive part is generating additional features, i.e. running a few unsupervised outlier detection algorithms. We did consider to enable GPU: https://pyod.readthedocs.io/en/latest/todo.html in the future, but for now it is still on the todo list and not decided when/how to do it efficiently.

Best, Yue

yzhao062 avatar Feb 10 '19 22:02 yzhao062

Thanks a lot. However, I wonder whether this tool can be used under big data enviroment in the future?

lk1983823 avatar Feb 11 '19 07:02 lk1983823

I am using the MO-GAAL and I was hoping to benefit from GPU but it is only 25% faster for the training. Is it expected? I am wondering if I am doing something wrong somewhere ^^

TimotheeGr avatar Apr 01 '21 15:04 TimotheeGr

I am using the MO-GAAL and I was hoping to benefit from GPU but it is only 25% faster for the training. Is it expected? I am wondering if I am doing something wrong somewhere ^^

Hi TimotheeGr, can you tell me how you enabled training on GPU for MO-GAAL ?

AmalMtibaa avatar Apr 12 '21 09:04 AmalMtibaa

if you are using the old version tensorflow (<=1.15), then make sure you installed tensorflow-gpu. for newer version tensorflow, that is automatic.

Given GPU is being used (search google "tensorflow not using gpu" if not), mo_gaal's usage is automatic. We get the consent from the paper author so that is based on their code.

yzhao062 avatar Apr 12 '21 13:04 yzhao062

After my question above I checked that the GPU was used with nvidia-smi and it is only used at 7-10% level which probably explains why it is not a big improvement. (But I am quite a beginner on this)

TimotheeGr avatar Apr 12 '21 13:04 TimotheeGr