lenskit.schemas#

Schemas for LensKit configuration and specification files.

This package collects the schemas used by various configuration capabilities in one subpackage, so they are easy to find and can reference each other without as many import problems as we have when they live inside the packages for the different subsystems they control.

Submodules#

pipeline

Pydantic models for pipeline configuration and serialization support.

settings

Schema for LensKit settings.

tuning

Functions#

load_model_data(…)

General-purpose function to automatically load configuration data and

Package Contents#

lenskit.schemas.load_model_data(path: pathlib.Path | os.PathLike[str], model: None = None) pydantic.JsonValue#
lenskit.schemas.load_model_data(path: pathlib.Path | os.PathLike[str], model: type[M]) M

General-purpose function to automatically load configuration data and optionally validate with a model.

Parameters:
  • path – The path to the configuration file. The file type is automatically detected.

  • model – The Pydantic model class to validate, or None to load as JSON-compatible data.

Returns:

The validated data.

Stability:
Internal (see Stability Levels).