tff.backends.mapreduce.get_map_reduce_form_for_iterative_process

Constructs tff.backends.mapreduce.MapReduceForm given iterative process.

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.

An instance of tff.backends.mapreduce.MapReduceForm equivalent to the provided tff.templates.IterativeProcess.

TypeError If the arguments are of the wrong types.
compiler.MapReduceFormCompilationError If the compilation process fails.