Pipeline API#

This page documents the LensKit pipeline API, exposed in the lenskit.pipeline module.

Pipeline Classes#

Pipeline

LensKit recommendation pipeline.

PipelineBuilder

Builder for LensKit recommendation pipelines.

PipelineState

Full results of running a pipeline.

Node

Representation of a single node in a Pipeline.

Lazy

Type for accepting lazy inputs from the pipeline runner.

PipelineCache

A cache to share components between pipelines.

Component Interface#

These are the interfaces and classes you need to reference when building new LensKit components.

Component

Base class for pipeline component objects.

Standard Pipelines#

RecPipelineBuilder

Builder to help assemble common pipeline patterns.

topn_pipeline

Create a pipeline that produces top-N recommendations using a scoring model.

predict_pipeline

Create a pipeline that predicts ratings, but does not include any ranking capabilities.

Serialized Configurations#

Most code will not need to directly use the configuration classes, but they define the schema of pipeline configuration files.

lenskit.pipeline.config

Pydantic models for pipeline configuration and serialization support.

Hook Interfaces#

ComponentInputHook

Inspect or process data as it passes to a component's input.

Nodes#

The pipeline directly exposes its nodes, but most code will not need to use them.