common#

Common components shared between server and client.

Functions

array_from_numpy(ndarray)

Create Array from NumPy ndarray.

bytes_to_ndarray(tensor)

Deserialize NumPy ndarray from bytes.

configure(identifier[, filename, host])

Configure logging to file and/or remote log server.

event(event_type[, event_details])

Submit create_event to ThreadPoolExecutor to avoid blocking.

log(level, msg, *args, **kwargs)

Log 'msg % args' with the integer severity 'level'.

ndarray_to_bytes(ndarray)

Serialize NumPy ndarray to bytes.

now()

Construct a datetime from time.time() with time zone set to UTC.

ndarrays_to_parameters(ndarrays)

Convert NumPy ndarrays to parameters object.

parameters_to_ndarrays(parameters)

Convert parameters object to NumPy ndarrays.

Classes

Array(dtype, shape, stype, data)

Array type.

ClientMessage([get_properties_res, ...])

ClientMessage is a container used to hold one result message.

Code(value)

Client status codes.

ConfigsRecord([configs_dict, keep_input])

Configs record.

Context(state)

State of your run.

DisconnectRes(reason)

DisconnectRes message from client to server.

EvaluateIns(parameters, config)

Evaluate instructions for a client.

EvaluateRes(status, loss, num_examples, metrics)

Evaluate response from a client.

EventType(value)

Types of telemetry events.

FitIns(parameters, config)

Fit instructions for a client.

FitRes(status, parameters, num_examples, metrics)

Fit response from a client.

Error(code[, reason])

A dataclass that stores information about an error that occurred.

GetParametersIns(config)

Parameters request for a client.

GetParametersRes(status, parameters)

Response when asked to return parameters.

GetPropertiesIns(config)

Properties request for a client.

GetPropertiesRes(status, properties)

Properties response from a client.

Message(metadata[, content, error])

State of your application from the viewpoint of the entity using it.

MessageType()

Message type.

MessageTypeLegacy()

Legacy message type.

Metadata(run_id, message_id, src_node_id, ...)

A dataclass holding metadata associated with the current message.

MetricsRecord([metrics_dict, keep_input])

Metrics record.

Parameters(tensors, tensor_type)

Model parameters.

ParametersRecord([array_dict, keep_input])

Parameters record.

ReconnectIns(seconds)

ReconnectIns message from server to client.

RecordSet([parameters_records, ...])

RecordSet stores groups of parameters, metrics and configs.

ServerMessage([get_properties_ins, ...])

ServerMessage is a container used to hold one instruction message.

Status(code, message)

Client status.