|View source on GitHub|
ExecutorFactory exposing hook to construct executors on environment change.
tff.framework.ExecutorFactory, change_query: Callable[[
tff.framework.CardinalitiesType], bool] = (lambda _: True) )
When the initialization parameter
ReconstructOnChangeExecutorFactory` constructs a new executor, bypassing
any previously constructed executors.
Releases any resources associated to the given cardinalities.
Note that calling this method may invalidate the state of any executors
which have previously been returned by the factory with the
create_executor should be called again if a new executor which
is safe to use is desired.
||The cardinalities of the executor whose state we wish to clear.|
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.|