lenskit.parallel.invoker#
- lenskit.parallel.invoker(model, func, n_jobs=None, progress=None)#
Get an appropriate invoker for performing operations on
model
.- Parameters:
model (M) – The model object on which to perform operations.
func (Callable[[M, A], R]) – The function to call. The function must be pickleable.
n_jobs (int | None) – The number of processes to use for parallel operations. If
None
, will callproc_count()
with a maximum default process count of 4.progress (Progress | None) –
A progress bar to use to report status. It should have the following states:
dispatched
in-progress
finished
One can be created with
invoke_progress()
- Returns:
An invoker to perform operations on the model.
- Return type: