Skip to content

Commit

Permalink
Fix NoneType Error
Browse files Browse the repository at this point in the history
  • Loading branch information
xcvil committed Jan 7, 2023
1 parent 54d0c63 commit 759c062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def main(cfg: DictConfig, **kwargs):
else:
result, scores = eval_step(task, generator, models, sample, **kwargs)
results += result
if isinstance(scores[0], tuple):
if scores and isinstance(scores[0], tuple):
score_sum += sum([s[0] for s in scores])
score_cnt += sum([s[1] for s in scores])
else:
Expand Down

0 comments on commit 759c062

Please sign in to comment.