Skip to main content

FittedRecipe.from_dict()

Reconstruct a fitted recipe from FittedRecipe.to_dict output. See mlfeatures.from_dict.

Usage

Source

FittedRecipe.from_dict(
    data,
    *,
    trusted=(),
)

Parameters

data: dict[str, object]

The dict produced by FittedRecipe.to_dict.

trusted: Iterable[type] = ()
Classes whose top-level packages the payload may also name classes from, for a step that is not registered. Defaults to none.

Raises

ValueError
If the payload is malformed, has a format_version this mlfeatures does not read, or names a class outside mlfeatures, the registered step plugins, and the packages of the trusted classes.