FittedRecipe.to_dict()
Serialize to a diffable, JSON-safe dict. See mlfeatures.to_dict for the layout.
Usage
FittedRecipe.to_dict()Use the dict when you are embedding the recipe in a larger payload or handing it to your own writer; for a file, prefer to_json or to_yaml.
Returns
dict- Plain data holding the roles, schema, lineage, and every step’s hyperparameters and learned statistics.
Raises
TypeError-
If a step holds something that cannot be serialized, such as a raw polars or narwhals selector, a
dateutilrule, or a function.
Warns
UserWarning- If a step comes from a package that mlfeatures.from_dict refuses by default.