Make a LightGBM object serializable by keeping raw bytes
Make a LightGBM object serializable by keeping raw bytes
If a LightGBM model object was produced with argument serializable=FALSE, the R object will not be serializable (e.g. cannot save and load with saveRDS and readRDS) as it will lack the raw bytes needed to reconstruct its underlying C++ object. This function can be used to forcibly produce those serialized raw bytes and make the object serializable. Note that the object will be modified in-place.
New in version 4.0.0
lgb.make_serializable(model)
Arguments
model: lgb.Booster object which was produced with serializable=FALSE.
Returns
lgb.Booster (the same model object that was passed as input, as invisible).