0

i want to benchmark different federated learning tools, does anyone know how to measure the training time with tensorflow federated? In all the tutorials the trainer only does the next function to perform training on all nodes and aggregating and i can not find the function which calls the training process on a invidual node. Can someone help me where to find this or has another idea which could work? Below is my training loop, its based on the example of the kubernetes simulation of tff https://www.tensorflow.org/federated/tutorials/high_performance_simulation_with_kubernetes

def train_loop(num_rounds=10, num_clients=10):
    state = trainer.initialize()
    for round in range(1, num_rounds + 1):
        train_data = train_data_iterator.select(num_clients)
        result = trainer.next(state, train_data)
        state = result.state
        train_metrics = result.metrics['client_work']['train']
        with open('readme.txt', 'a+') as f:
            f.writelines('round {:2d}, metrics={}'.format(round, train_metrics))
        print('round {:2d}, metrics={}'.format(round, train_metrics))

Searching trough the source code to find the function that gets called when a invidual nodes trains on there local data but i found nothing so far.

werwom
  • 1

0 Answers0