Class - AggregatorGRPCClient#
- class openfl.transport.grpc.aggregator_client.AggregatorGRPCClient(agg_addr, agg_port, aggregator_uuid, federation_uuid, collaborator_name, use_tls=True, require_client_auth=True, root_certificate=None, certificate=None, private_key=None, single_col_cert_common_name=None, refetch_server_cert_callback=None, enable_atomic_connections=False, resend_data_on_reconnection=True, **kwargs)[source]#
Bases:
objectCollaborator-side gRPC client that talks to the aggregator.
- Parameters:
aggregator_uuid (str)
federation_uuid (str)
collaborator_name (str)
- agg_addr#
Aggregator address.
- Type:
str
- agg_port#
Aggregator port.
- Type:
int
- aggregator_uuid#
The UUID of the aggregator.
- Type:
str
- federation_uuid#
The UUID of the federation.
- Type:
str
- collaborator_name#
The common name of this collaborator.
- Type:
str
- use_tls#
Whether to use TLS for the connection.
- Type:
bool
- require_client_auth#
Whether to enable client-side authentication, i.e. mTLS. Ignored if use_tls=False.
- Type:
bool
- root_certificate#
The path to the root certificate for the TLS connection, ignored if use_tls=False.
- Type:
str
- certificate#
The path to the client’s certificate for the TLS connection, ignored if use_tls=False.
- Type:
str
- private_key#
The path to the client’s private key for the TLS connection, ignored if use_tls=False.
- Type:
str
- single_col_cert_common_name#
The common name on the collaborator’s certificate.
- Type:
str
- refetch_server_cert_callback#
Callback function to refetch the server certificate.
- Type:
function
- enable_atomic_connections#
Whether to use atomic connections (i.e. creates a new gRPC channel for each transaction and closes them immediately).
- Type:
bool
- resend_data_on_reconnection#
Whether to resend data on reconnection.
- Type:
bool
- __init__(agg_addr, agg_port, aggregator_uuid, federation_uuid, collaborator_name, use_tls=True, require_client_auth=True, root_certificate=None, certificate=None, private_key=None, single_col_cert_common_name=None, refetch_server_cert_callback=None, enable_atomic_connections=False, resend_data_on_reconnection=True, **kwargs)[source]#
- Parameters:
aggregator_uuid (str)
federation_uuid (str)
collaborator_name (str)
Methods
__init__(agg_addr, agg_port, ...[, use_tls, ...])Close the gRPC channel.
get_aggregated_tensor(*args, **kwargs)get_tasks(*args, **kwargs)Create a new channel with the gRPC server.
send_local_task_results(*args, **kwargs)send_message_to_server(*args, **kwargs)validate_response(response)Validate the aggregator response.