poprox_recommender.recommenders.hooks#

POPROX recommendation hooks.

Functions

shallow_copy_pydantic_model(node, ...)

LensKit component-input hook to perform shallow copies of Pydantic models before they are passed to components.

poprox_recommender.recommenders.hooks.shallow_copy_pydantic_model(node, input_name, input_type, value, **context)#

LensKit component-input hook to perform shallow copies of Pydantic models before they are passed to components.

Parameters:
  • node (ComponentInstanceNode[Any])

  • input_name (str)

  • input_type (Any)

  • value (Any)

  • context (Any)

Return type:

Any