load_model¶
yohou_mlflow.load_model(model_uri, dst_path=None, *, extra_trusted_types=None, extra_trusted_prefixes=None, extra_version_rules=None, strict=True)
¶
Load a yohou forecaster saved by this flavour.
Checks run in this order, and each one stops the load before anything from the file is constructed: the format version, the package versions, then the types in the skops file against the trust policy.
Parameters ¶
| Name | Type | Description | Default |
|---|---|---|---|
model_uri
|
str
|
Any MLflow model URI, for example |
required |
dst_path
|
str or None
|
Local directory to download the model into. |
None
|
extra_trusted_types
|
iterable of str or None
|
Exact type names to trust in addition to the built-in policy. The saved model cannot add to this list. |
None
|
extra_trusted_prefixes
|
iterable of str or None
|
Module prefixes to trust, each ending in |
None
|
extra_version_rules
|
mapping of str to str or None
|
Rules for packages outside the built-in ones, applied to each such package the model recorded. |
None
|
strict
|
bool
|
When |
True
|
Returns ¶
| Type | Description |
|---|---|
yohou forecaster
|
The forecaster, in the state it was saved in. |
Raises ¶
| Type | Description |
|---|---|
FormatVersionError
|
If the model was saved in a format version this release cannot read. |
VersionMismatchError
|
If |
UntrustedTypesError
|
If the skops file holds types outside the policy and the caller's additions. |
ValueError
|
If a trusted prefix is not a module path ending in |
See Also ¶
check_compatibility : Run the same checks without loading anything.