mlrun.package#
The mlrun.package module provides MLRun's packagers system — classes that
automatically serialize and deserialize Python objects moving in and out of MLRun
functions. Your function code stays pure Python; type hints and log hints are all
that's needed.
Packagers perform two tasks:
Parsing inputs — cast
inputsvalues to the type-hinted Python type (e.g.pd.DataFrame,dict,np.ndarray).Logging outputs — serialize returned objects and log them as artifacts or results based on the provided log hints (
returns).
For a full introduction — including usage patterns, log hints, configuration, and built-in packagers — see Packagers. To create a custom packager, see Creating custom packagers.
|
A log hint is a configuration to log an object returned from an MLRun function. |
The abstract base class for a packager. |
|
A default packager that handles all types and packs them as pickle files. |
|
A packager manager holds the project's packagers and sends them objects to pack, and data items to unpack. |
Built-in packager modules
MLRun includes the following built-in packager modules. All built-in packagers
subclass DefaultPackager and
are registered automatically at the start of each run.