diff --git a/examples/xgboost-comprehensive/utils.py b/examples/xgboost-comprehensive/utils.py index 51a4bb16e5b8..05a5630dc771 100644 --- a/examples/xgboost-comprehensive/utils.py +++ b/examples/xgboost-comprehensive/utils.py @@ -241,10 +241,12 @@ def sample( criterion: Optional[Criterion] = None, ) -> List[ClientProxy]: """Sample a number of Flower ClientProxy instances.""" + # Block until at least num_clients are connected. if min_num_clients is None: min_num_clients = num_clients self.wait_for(min_num_clients) + # Sample clients which meet the criterion available_cids = list(self.clients) if criterion is not None: