Skip to main content

Module serde_support

Module serde_support 

Source
Expand description

Model serialization and deserialization support.

Provides JSON serialization (default feature) and optional bincode serialization for model persistence. Currently exposes utility functions for serializing/deserializing generic Serialize/Deserialize types.

Re-exports§

pub use crate::loss::LossType;

Structs§

DistributionalModelState
Serializable state for DistributionalSGBT.
ModelState
Complete serializable state of an SGBT model.
StepSnapshot
Serializable snapshot of a single boosting step.
TreeSnapshot
Serializable snapshot of the tree arena structure.

Functions§

from_bincode
Deserialize a value from bincode bytes.
from_json
Deserialize a value from a JSON string.
from_json_bytes
Deserialize a value from JSON bytes.
load_distributional_model
Deserialize a DistributionalModelState from JSON.
load_distributional_model_bincode
Deserialize a DistributionalModelState from bincode bytes.
load_model
Load an SGBT model from a JSON string.
load_model_bincode
Load an SGBT model from bincode bytes.
save_distributional_model
Serialize a DistributionalModelState to JSON.
save_distributional_model_bincode
Serialize a DistributionalModelState to bincode bytes.
save_model
Save an SGBT model to a JSON string.
save_model_bincode
Save an SGBT model to bincode bytes.
save_model_with
Save an SGBT model to a JSON string with an explicit loss type tag.
to_bincode
Serialize a value to bincode bytes.
to_json
Serialize a value to a JSON string.
to_json_bytes
Serialize a value to JSON bytes.
to_json_pretty
Serialize a value to a pretty-printed JSON string.