Attend the Women in ML Symposium on December 7 Register now

tff.program.FederatedDataSource

Stay organized with collections Save and categorize content based on your preferences.

An abstract interface for representing federated data sources.

Used in the notebooks

Used in the tutorials

This interface abstracts away the specifics of working with various types of data sources.

Things one can do with a data source:

  • Determine the type of the data supplied by this data source by inspecting the federated_type property. The type returned should be a federated type. Note that depending on whether this data source contains one or a number of federated datasets, the type may or may not be a struct (with individual datasets appearing as elements of this struct).

  • Determine the guarantees/features offered by this data source by inspecting the capabilities property.

  • Construct a new iterator for this data source by invoking iterator on it. Each iterator represents an independent pass over the data from this data source.

See tff.program.Capability for the descriptions of the formal guarantees.

capabilities The list of capabilities supported by this data source.
federated_type The type of the data returned by calling select on an iterator.

Methods

iterator

View source

Returns a new iterator for retrieving data from this data source.