(self, my_round, possible_clients, num_clients=20)
return [(c.num_train_samples, c.num_test_samples) for c in self.selected_clients]
Selects num_clients clients randomly from possible_clients.
        
        Note that within function, num_clients is set to
            min(num_clients, len(possible_clients)).

        Args:
            possible_clients: Clients from which the server can select.
            num_clients: Number of clients to select; default 20
        Return:
            list of (num_train_samples, num_test_samples)
Selects num_clients clients randomly from possible_clients.
        
        Note that within function, num_clients is set to
            min(num_clients, len(possible_clients)).
Selects num_clients clients randomly from possible_clients . Note that within function num_clients is set to min ( num_clients len ( possible_clients )) .
def select_clients(self, my_round, possible_clients, num_clients=20):
        """Selects num_clients clients randomly from possible_clients.
        
        Note that within function, num_clients is set to
            min(num_clients, len(possible_clients)).

        Args:
            possible_clients: Clients from which the server can select.
            num_clients: Number of clients to select; default 20
        Return:
            list of (num_train_samples, num_test_samples)
        """
        num_clients = min(num_clients, len(possible_clients))
        np.random.seed(my_round)
        self.selected_clients = np.random.choice(possible_clients, num_clients, replace=False)

        return [(c.num_train_samples, c.num_test_samples) for c in self.selected_clients]
def select_clients ( self , my_round , possible_clients , num_clients = 20 ) : num_clients = min ( num_clients , len ( possible_clients ) ) np . random . seed ( my_round ) self . selected_clients = np . random . choice ( possible_clients , num_clients , replace = False ) return [ ( c . num_train_samples , c . num_test_samples ) for c in self . selected_clients ]