|View source on GitHub|
comp's placement, returning a single call to map, apply or value.
tff.framework.unwrap_placement( comp )
For this purpose it is necessary to assume that all processing under
is happening at a single placement.
The other assumptions on inputs of
unwrap_placement are enumerated as
- There is at most one unbound reference under
comp, which is of federated type.
- The only intrinsics present here are apply or map, zip, and federated_valueat*.
- The type signature of
- There are no instances of
building_blocks.Dataof federated type under
comp; how these would be handled by a function such as this is not entirely clear.
Under these conditions,
unwrap_placement will produce a single call to
federated_map, federated_apply or federated_value, depending on the placement
and type signature of
comp. Other than this single map or apply, no
intrinsics will remain under
A modified version of
If the lone unbound reference under
If we encounter a placement other than the one declared by