ping98k commited on
Commit
23413a2
·
2 Parent(s): ce368c9 69049d2

Merge branch 'codex/add-total-token-count-and-log-completion-output' of https://github.com/ping98k/llm-brainstorm into codex/add-total-token-count-and-log-completion-output

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -132,7 +132,7 @@ def run_tournament(
132
  p: s
133
  for p, s in zip(
134
  all_players,
135
- ex.map(score, all_players),
136
  )
137
  }
138
  hist_fig = plt.figure()
@@ -161,7 +161,7 @@ def run_tournament(
161
  def tournament_round(pairs, executor):
162
  futures = {executor.submit(play, a, b): (a, b) for a, b in pairs}
163
  results = []
164
- for fut in as_completed(futures):
165
  a, b = futures[fut]
166
  winner = fut.result()
167
  loser = b if winner == a else a
@@ -192,7 +192,7 @@ def run_tournament(
192
  for j in range(i + 1, len(candidates))
193
  ]
194
  futures = {executor.submit(play, a, b): (a, b) for a, b in pairs}
195
- for fut in as_completed(futures):
196
  wins[fut.result()] += 1
197
  return sorted(candidates, key=lambda p: wins[p], reverse=True)
198
 
 
132
  p: s
133
  for p, s in zip(
134
  all_players,
135
+ tqdm(ex.map(score, all_players), total=len(all_players)),
136
  )
137
  }
138
  hist_fig = plt.figure()
 
161
  def tournament_round(pairs, executor):
162
  futures = {executor.submit(play, a, b): (a, b) for a, b in pairs}
163
  results = []
164
+ for fut in tqdm(as_completed(futures), total=len(futures)):
165
  a, b = futures[fut]
166
  winner = fut.result()
167
  loser = b if winner == a else a
 
192
  for j in range(i + 1, len(candidates))
193
  ]
194
  futures = {executor.submit(play, a, b): (a, b) for a, b in pairs}
195
+ for fut in tqdm(as_completed(futures), total=len(futures)):
196
  wins[fut.result()] += 1
197
  return sorted(candidates, key=lambda p: wins[p], reverse=True)
198