tfep.utils.parallel.SerialStrategy

class tfep.utils.parallel.SerialStrategy[source]

Bases: ParallelizationStrategy

A simple serial execution of the function.

__init__()

Methods

__init__()

run(func, args)

Serially execute the function over the arguments.

run(func, args)[source]

Serially execute the function over the arguments.

Parameters:
  • func (Callable) – The function to execute.

  • args (Iterable) – args[i] are the arguments of the i-th execution, and they are passed to the function as func(*args[i]).

Returns:

resultsresults[i] is the return value of the function called with args[i].

Return type:

List