lenskit.pipeline.ComponentInputHook#

class lenskit.pipeline.ComponentInputHook#

Bases: Protocol

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

As with all Pipeline Hooks, an input hook is a callable that is run at the appropriate stage of the input.

Component input hooks are installed under the name component-input.

Stability:

Experimental

__call__(node, input, value, **context)#

Inspect or process the component input data.

Parameters:
Returns:

The value to pass to the component. For inspection-only hooks, this will just be value; hooks can also substitute alternative values depending on application needs.

Return type:

Any