Skip to content

Commit

Permalink
fix ruff suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrede committed Aug 16, 2024
1 parent 001f991 commit 1a03e0a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fedn/network/combiner/roundhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,7 @@ def _assign_round_clients(self, n, type="trainers"):
logger.error("(ERROR): {} is not a supported type of client".format(type))

# If the number of requested trainers exceeds the number of available, use all available.
if n > len(clients):
n = len(clients)
n = min(n, len(clients))

# If not, we pick a random subsample of all available clients.
clients = random.sample(clients, n)
Expand Down

0 comments on commit 1a03e0a

Please sign in to comment.