openfl.interface.interactive_api.federation.Federation

class openfl.interface.interactive_api.federation.Federation(client_id=None, director_node_fqdn=None, director_port=None, tls=True, cert_chain=None, api_cert=None, api_private_key=None)

Bases: object

Federation class.

Manages information about collaborator settings, local data, and network settings.

The Federation class is used to maintain information about collaborator-related settings, their local data, and network settings to enable communication within the federation.

Class Attributes:
  • director_node_fqdn (str) – The fully qualified domain name (FQDN) of the director node.

  • tls (bool) – A boolean indicating whether mTLS (mutual Transport Layer Security) is enabled.

  • cert_chain (str) – The path to the certificate chain to the Certificate Authority (CA).

  • api_cert (str) – The path to the API certificate.

  • api_private_key (str) – The path to the API private key.

  • dir_client (DirectorClient) – An instance of the DirectorClient class.

  • sample_shape (tuple) – The shape of the samples in the dataset.

  • target_shape (tuple) – The shape of the targets in the dataset.

Methods

get_dummy_shard_descriptor

Return a dummy shard descriptor.

get_shard_registry

Return a shard registry.

get_dummy_shard_descriptor(size)

Return a dummy shard descriptor.

Parameters:

size (int) – Size of the shard descriptor.

Returns:

DummyShardDescriptor – A dummy shard descriptor.

get_shard_registry()

Return a shard registry.

Returns:

list – A list of envoys.