poprox_recommender.config#

Access to configuration settings for the POPROX recommender pipeline.

Functions

allow_data_test_failures()

Whether to allow tests to fail because the DVC-managed data is missing.

available_cpu_parallelism([max])

Get the available amount of CPU parallelism.

default_device()

Get the default device for POPROX components.

poprox_recommender.config.default_device()#

Get the default device for POPROX components. This is read from the POPROX_REC_DEVICE environment variable, and defaults to cpu if that variable is not set.

Return type:

str

poprox_recommender.config.available_cpu_parallelism(max=None)#

Get the available amount of CPU parallelism. If the POPROX_CPU_COUNT environment variable is set, that is consulted; otherwise the number of CPUs detected on the system is returned.

Parameters:

max (int | None) – The maximum # of CPUs (ignored if CPU count comes from the environment variable).

Returns:

# The number of CPUs to use for parallelism.

Return type:

int

poprox_recommender.config.allow_data_test_failures()#

Whether to allow tests to fail because the DVC-managed data is missing.

Return type:

bool