lgb.make_serializable: Make a LightGBM object serializable by keeping raw bytes

View source: R/lgb.make_serializable.R

lgb.make_serializableR Documentation

Make a LightGBM object serializable by keeping raw bytes

Description

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

Usage

lgb.make_serializable(model)

Arguments

model

lgb.Booster object which was produced with 'serializable=FALSE'.

Value

lgb.Booster (the same 'model' object that was passed as input, as invisible).

See Also

lgb.restore_handle, lgb.drop_serialized.


lightgbm documentation built on Sept. 11, 2024, 8:44 p.m.