poprox_recommender.recommenders.load#

Functions and logic for loading recommender pipeline configurations.

Functions

default_pipeline()

Get the configured default pipeline.

discover_pipelines()

Discover the list of available pipeline configuration names.

get_pipeline(name[, device, num_slots])

Get a built pipeline by name.

get_pipeline_builder(name[, device, num_slots])

Get a pipeline builder by name.

load_all_pipelines([device, num_slots])

Exceptions

PipelineLoadError

Exception raised when a pipeline cannot be loaded or instantiated, to separate those errors from errors running the pipeline.

exception poprox_recommender.recommenders.load.PipelineLoadError#

Bases: Exception

Exception raised when a pipeline cannot be loaded or instantiated, to separate those errors from errors running the pipeline.

poprox_recommender.recommenders.load.discover_pipelines()#

Discover the list of available pipeline configuration names.

Return type:

list[str]

poprox_recommender.recommenders.load.default_pipeline()#

Get the configured default pipeline.

This uses the POPROX_DEFAULT_PIPELINE environment variable, if it is set; otherwise, it returns poprox_recommender.recommenders.configurations.DEFAULT_PIPELINE.

Return type:

str

poprox_recommender.recommenders.load.get_pipeline_builder(name, device=None, num_slots=10)#

Get a pipeline builder by name.

Parameters:
  • name (str)

  • device (str | None)

  • num_slots (int)

Return type:

PipelineBuilder

poprox_recommender.recommenders.load.get_pipeline(name, device=None, num_slots=10)#

Get a built pipeline by name.

Parameters:
  • name (str)

  • device (str | None)

  • num_slots (int)

Return type:

Pipeline