|View source on GitHub|
Implementation of executor factory holding an executor per cardinality.
tff.framework.ResourceManagingExecutorFactory( executor_stack_fn: Callable[[executor_factory.CardinalitiesType],
Callable taking a mapping from
close on all constructed executors, resetting internal cache.
If a caller holds a name bound to any of the executors returned from
create_executor, this executor should be assumed to be in an invalid
state, and should not be used after this method is called. Instead, callers
should again invoke
create_executor( cardinalities: executor_factory.CardinalitiesType ) ->
Constructs or gets existing executor.
Returns a previously-constructed executor if this method has already been
cardinalities. If not, invokes
cardinalities and returns the result.