golf_federated.client.communication.api package

Submodules

golf_federated.client.communication.api.download module

golf_federated.client.communication.api.download.download_info(host: str, port: str, client_name: str) → Tuple[bool, str, List][source]

Client downloads task info.

Args:

host (str): Host name to connect to the host. port (str): Port number to connect to the host. client_name (str): Client name to download the task info.

Returns:
Tuple: Return as a tuple, including:

isdocker (bool): Whether the task requires Docker. filename (str): File name of the task info. aggregation_field (List): Fields required for model aggregation.

golf_federated.client.communication.api.download.download_model(host: str, port: str, client_name: str) → str[source]

Client downloads global model.

Args:

host (str): Host name to connect to the host. port (str): Port number to connect to the host. client_name (str): Client name to download the global model.

Returns:

Str: File name of the global model.

golf_federated.client.communication.api.interact module

golf_federated.client.communication.api.interact.client_register(host: str, port: str, client_name: str) → bytes[source]

Client registration.

Args:

host (str): Host name to connect to the host. port (str): Port number to connect to the host. client_name (str): Client name to register.

Returns:

Bytes: Request information.

golf_federated.client.communication.api.upload module

golf_federated.client.communication.api.upload.upload_model(host: str, port: str, client_name: str, model: List, aggregation_field: dict) → bytes[source]

Client uploads local model and related files.

Args:

host (str): Host name to connect to the host. port (str): Port number to connect to the host. client_name (str): Client name to upload. model (List): Local model weight. aggregation_field (dict): Aggregate fields with corresponding values.

Returns:

Bytes: Request information.

Module contents