![]() |
A executor factory holding an executor per cardinality.
Inherits From: ResourceManagingExecutorFactory
, ExecutorFactory
tff.framework.SizingExecutorFactory(
executor_stack_fn: Callable[[executor_factory.CardinalitiesType], Tuple[executor_base.Executor,
List[sizing_executor.SizingExecutor]]]
)
Args | |
---|---|
executor_stack_fn
|
Similar to base class but the second return value of the callable is used to expose the SizingExecutors. |
Methods
clean_up_executors
clean_up_executors()
Calls 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
.
create_executor
create_executor(
cardinalities: executor_factory.CardinalitiesType
) -> tff.framework.Executor
See base class.
get_size_info
get_size_info() -> tff.framework.SizeInfo
Returns information about the transferred data of each SizingExecutor.
Returns the history of broadcast and aggregation for each executor as well as the number of aggregated bits that has been passed through.
Returns | |
---|---|
An instance of SizeInfo .
|