Skip to main content

FittedRecipe.from_json()

Reconstruct a fitted recipe from FittedRecipe.to_json output. See mlfeatures.from_json.

Usage

Source

FittedRecipe.from_json(
    text,
    *,
    trusted=(),
)

Parameters

text: str

The JSON text produced by FittedRecipe.to_json.

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
As for FittedRecipe.from_dict; text that is not valid JSON raises json.JSONDecodeError, a ValueError subclass.