lenskit.pipeline.ComponentInputHook =================================== .. py:class:: lenskit.pipeline.ComponentInputHook :canonical: lenskit.pipeline._hooks.ComponentInputHook Bases: :py:obj:`Protocol` Inspect or process data as it passes to a component's input. As with all :ref:`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 .. py:method:: __call__(node, input, value, **context) Inspect or process the component input data. :param node: The component node being invoked. :param input_name: The name of the component's input that will receive the data. :param input_type: The type of data the component expects for this input, if one was specified in the component definition. :param value: The data value to be supplied. This is declared :class:`object`, because its type is not known or guaranteed in the genral case. :param context: Additional context variables, mostly for the use of internal hooks. :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.