Constructs tff.backends.mapreduce.MapReduceForm
given iterative process.
tff.backends.mapreduce.get_map_reduce_form_for_iterative_process(
ip: tff.templates.IterativeProcess
,
grappler_config: tf.compat.v1.ConfigProto = _GRAPPLER_DEFAULT_CONFIG,
*,
tff_internal_preprocessing: Optional[BuildingBlockFn] = None
) -> tff.backends.mapreduce.MapReduceForm
Args |
ip
|
An instance of tff.templates.IterativeProcess that is compatible with
MapReduce form. Iterative processes are only compatible if initialize_fn
returns a single federated value placed at SERVER and next takes
exactly two arguments. The first must be the state value placed at
SERVER . - next returns exactly two values.
|
grappler_config
|
An optional instance of tf.compat.v1.ConfigProto to
configure Grappler graph optimization of the TensorFlow graphs backing the
resulting tff.backends.mapreduce.MapReduceForm . These options are
combined with a set of defaults that aggressively configure Grappler. If
the input grappler_config has
graph_options.rewrite_options.disable_meta_optimizer=True , Grappler is
bypassed.
|
tff_internal_preprocessing
|
An optional function to transform the AST of the
iterative process.
|
Raises |
TypeError
|
If the arguments are of the wrong types.
|
compiler.MapReduceFormCompilationError
|
If the compilation process fails.
|