IterativeExecutor#

class coffea.processor.IterativeExecutor(status: bool = True, unit: str = 'items', desc: str = 'Processing', compression: int | None = 1, function_name: str | None = None, workers: int = 1, retries: int = 3)[source]#

Bases: ExecutorBase

Execute in one thread iteratively

Parameters:
  • items (list) – List of input arguments

  • function (callable) – A function to be called on each input, which returns an accumulator instance

  • accumulator (Accumulatable) – An accumulator to collect the output of the function

  • status (bool) – If true (default), enable progress bar

  • unit (str) – Label of progress bar unit

  • desc (str) – Label of progress bar description

  • compression (int, optional) – Ignored for iterative executor

  • retries (int, optional) – Number of retries for failed tasks (default: 3)

Returns:

out(accumulator, 0) after all items have been merged.

Return type:

tuple(Accumulatable, int | BaseException)

Attributes Summary

Methods Summary

__call__(items, function, accumulator)

Call self as a function.

Attributes Documentation

compression: int | None = 1#
desc: str = 'Processing'#
function_name: str | None = None#
retries: int = 3#
status: bool = True#
unit: str = 'items'#
workers: int = 1#

Methods Documentation

__call__(items: Iterable, function: Callable, accumulator: Addable | MutableSet | MutableMapping)[source]#

Call self as a function.