|View source on GitHub|
Implementation of executor factory holding an executor per cardinality.
tff.framework.ResourceManagingExecutorFactory( executor_stack_fn: Callable[[
tff.framework.Executor], ensure_closed: Optional[Sequence[executor_base.Executor]] = None )
Callable taking a mapping from
Optional sequence of
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
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.