oneDAL icon indicating copy to clipboard operation
oneDAL copied to clipboard

How to convert a trained LGBM model to DAAL model by CPP interfaces?

Open AllenSun1024 opened this issue 1 year ago • 6 comments

Describe the bug

  • In Python, we can simply use daal4py.get_gbt_model_from_lightgbm() to convert a trained LGBM model to oneDAL, and use daal4py.gbt_regression_prediction() to predict.
  • May I find the corresponding CPP interfaces to convert models and predict?

AllenSun1024 avatar Jul 02 '24 11:07 AllenSun1024

Hi, the conversion has only python implementation for now.

razdoburdin avatar Jul 03 '24 07:07 razdoburdin

Hi, @razdoburdin

Thanks for your kind reply.

Further, have your team started to implement the CPP converter interfaces?

Best, Chao

AllenSun1024 avatar Jul 04 '24 06:07 AllenSun1024

Hi, @razdoburdin

Thanks for your kind reply.

Further, have your team started to implement the CPP converter interfaces?

Best, Chao

Could you please describe your use case? We don't have such plans for now.

razdoburdin avatar Jul 04 '24 10:07 razdoburdin

Hi, @razdoburdin

My use case is described below:

  • I have a LightGBM model trained through LightGBM's Python API
  • I use LightGBM's C++ API to load the pre-trained model and infer
  • To make the speed of inference faster, I need some C++ APIs which are similar to Python daal4py to convert the LightGBM model to DAL model.

Best, Chao

AllenSun1024 avatar Jul 08 '24 05:07 AllenSun1024

Hi @AllenSun1024 , On the last stage, do you have particular requirement/expectation? Is your case latency sensitive? Could you please elaborate more?

syakov-intel avatar Jul 08 '24 11:07 syakov-intel

Hi, @syakov-intel

My case is latency sensitive. I wanna use oneDAL to accelerate on Intel Xeon CPU. I think inferring on Intel Xeon CPU with oneDAL's C++ interfaces will make a great progress in speed just like Python daal4py, right?

AllenSun1024 avatar Jul 09 '24 05:07 AllenSun1024