Validating with typical AI/ML models is predicated on all the data being available locally. Splitting the data into e.g. 80/20 % split, 80% data for training, and 20% for test/evaluation. This scenario isn’t applicable to the FL paradigm.
Using the evaluation function with TFF, should you validate at the individual client level or at a global level. i.e.
Next word prediction example scenario: From the perspective of the solution developer, you may wish to evaluate model accuracy over a larger a number of users, but from the perspective of a single user, you want your next word prediction model to be performed for your personal needs.
Example,
Eval Loop.
NUM_ROUNDS = 10
for round_num in range(1, NUM_ROUNDS+1):
...
federated_test_data = random_clients(emnist_test.client_ids,10)
test_metrics = evaluation(state.model, federated_test_data)
print('Validation round {:2d}, metrics={}'.format(round_num, test_metrics))
...
Where you have a previously define function random_clients to randomly sample from the domain of available clients.?
Do you evaluate on a single client or on multiple clients?