|View source on GitHub|
ExecutorFactory exposing hook to construct executors on environment change.
tff.framework.ExecutorFactory, ensure_closed: Optional[Sequence[executor_base.Executor]] = None, change_query: Callable[[executor_factory.CardinalitiesType], bool] = (lambda _: True) )
When the initialization parameter
ReconstructOnChangeExecutorFactory` constructs a new executor, bypassing
any previously constructed executors.
Releases any resources held by the factory.
Note that calling this method may invalidate the state of any executors
which have previously been returned by the factory;
should be called again if a new executor which is safe to use is desired.
create_executor( cardinalities: executor_factory.CardinalitiesType ) ->
Returns a new or existing executor, depending on
create_executor constructs a new executor whenever
True when called with argument
create_executor is free to inspect its internal executor cache
and return a previously constructed executor if one is available.
||A mapping from placement literals to ints.|