jpmml / r2pmml

R library for converting R models to PMML
GNU Affero General Public License v3.0
73 stars 18 forks source link

Does this package support lightGBMs? #75

Closed flippercy closed 4 days ago

flippercy commented 1 year ago

Hi @vruusmann:

Does this package support lightGBM models, please?

Thank you.

vruusmann commented 1 year ago

The R wrapper for LightGBM models is some weird & super complex class, which cannot be persisted using the standard saveRDS() function call.

Therefore, you must go use the manual workflow:

  1. Train a LightGBM model in R
  2. Save the LightGBM portion of this weird & complex object into a LGBM file using the lgbm.save() function: https://lightgbm.readthedocs.io/en/latest/R/reference/lgb.save.html
  3. Convert the LGBM file using the JPMML-LightGBM command-line application.
vruusmann commented 1 year ago

The R wrapper for LightGBM models is some weird & super complex class, which cannot be persisted using the standard saveRDS() function call.

This issue might have been fixed in LightGBM version 4.0.0.

See https://github.com/microsoft/LightGBM/pull/4685 and https://github.com/microsoft/LightGBM/issues/4296

Reopening, as a reminder to re-evaluate the situation.