lenskit.pipeline.components#
Definition of the component interfaces.
Attributes#
Pure-function interface for pipeline functions.
Classes#
Representation of a component input slot.
Protocol for component constructors.
Base class for pipeline component objects. Any component that is not just a
Configuration for the placeholder component.
Simple no-op component to use as a placeholder in partial pipelines.
Functions#
component_inputs(component, *[, warn_on_missing, ...])
component_return_type(component)
fallback_on_none(primary, fallback)
Fallback to a second component if the primary input is None.
is_component_class(obj)
Check if the provided object is a component class.
Module Contents#
- typelenskit.pipeline.components.PipelineFunction=Callable[...,COut]#
Pure-function interface for pipeline functions.
- lenskit.pipeline.components.component_inputs[COut](component, *, warn_on_missing=True, _warn_level=1)#
- Parameters:
component (Component [COut] | ComponentConstructor [Any, COut] | PipelineFunction [COut])
warn_on_missing (bool)
_warn_level (int)
- Return type:
- lenskit.pipeline.components.component_return_type[COut](component)#
- Parameters:
component (Component [COut] | ComponentConstructor [Any, COut] | PipelineFunction [COut])
- Return type:
type[COut] | None
- lenskit.pipeline.components.fallback_on_none[T](primary, fallback)#
Fallback to a second component if the primary input is None.
- Stability:
- Caller (see Stability Levels ).
- Parameters:
primary (T)
fallback (lenskit.lazy.Lazy [T])
- Return type:
T
Exported Aliases#
- exceptionlenskit.pipeline.components.PipelineWarning#
Re-exported alias for
lenskit.diagnostics.PipelineWarning.
- classlenskit.pipeline.components.Lazy#
Re-exported alias for
lenskit.lazy.Lazy.
- exceptionlenskit.pipeline.components.TypecheckWarning#
Re-exported alias for
lenskit.pipeline._types.TypecheckWarning.
- lenskit.pipeline.components.is_compatible_data()#
Re-exported alias for
lenskit.pipeline._types.is_compatible_data().