main module

Script to run the baselines.

main.main()[source]
main.online(clients)[source]

We assume all users are always online.

main.parse_args()[source]
main.print_metrics(metrics, weights)[source]

Prints weighted averages of the given metrics.

Parameters:
  • metrics – dict with client ids as keys. Each entry is a dict with the metrics of that client.
  • weights – dict with client ids as keys. Each entry is the weight for that client.
main.save_model(server_model, dataset, model)[source]

Saves the given server model on checkpoints/dataset/model.ckpt.

main.setup_clients(dataset, model=None)[source]

Instantiates clients based on given train and test data directories.

Returns:list of Client objects.
Return type:all_clients