lenskit.config.ParallelSettings#
- classlenskit.config.ParallelSettings#
Bases:
pydantic_settings.BaseSettingsConfiguration for LensKit’s parallel processing. These settings are in the
[parallel]table inlenskit.toml.See also
- model_config#
- num_cpus:int =0#
The number of CPUs LensKit should consider using. This is auto-detected from the system environment, and should only be configured manually if you want to override LensKit’s CPU detection for some reason. Note that the auto-detected values do account for operating system scheduling affinities and CPU limits.
This value is not used directly as a limit, but is used to derive the default values for the other concurrency controls (threads, etc.).
- num_batch_jobs:int =0#
Number of batch inference jobs to run in parallel. Can be overridden with the
LK_NUM_BATCH_JOBSenvironment variable.
- num_threads:int =0#
Number of threads to use. Can be overridden with the
LK_NUM_THREADSenvironment variable. Specify -1 to use all available threads.
- num_backend_threads:int =0#
Number of threads for compute backends to use. Can be overridden with the
LK_NUM_BACKEND_THREADSenvironment variable. Specify -1 to leave threading limits unmodified.
- tune_jobs:int |None =None#
Maximum number of hyperparamter tuning jobs. Alias for
TuneSettings.jobs.
- propertytotal_threads#
- resolve_defaults()#
Resolve default values for thread/process counts.