Skip to content

Commit

Permalink
fix random seed when shuffling runs
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdidc committed Aug 17, 2023
1 parent 637a839 commit 4071153
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clip_benchmark/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def main_eval(base):
local_rank, rank, world_size = world_info_from_env()
runs = list(runs)
# randomize runs so that runs are balanced across gpus
random.seed(base.seed)
random.shuffle(runs)
runs = [r for i, r in enumerate(runs) if i % world_size == rank]
for (model, pretrained), (dataset), (language) in runs:
Expand Down

0 comments on commit 4071153

Please sign in to comment.