From 9b0e104726bd3910efd35cc81bb5a0176f71b0cb Mon Sep 17 00:00:00 2001 From: Ethan Perez Date: Tue, 30 Jun 2020 15:07:44 -0500 Subject: [PATCH] Remove name conflict for variable "start" --- bert_score/score.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bert_score/score.py b/bert_score/score.py index b62d3bd..f5a0054 100644 --- a/bert_score/score.py +++ b/bert_score/score.py @@ -141,8 +141,8 @@ def score( if ref_group_boundaries is not None: max_preds = [] - for start, end in ref_group_boundaries: - max_preds.append(all_preds[start:end].max(dim=0)[0]) + for beg, end in ref_group_boundaries: + max_preds.append(all_preds[beg:end].max(dim=0)[0]) all_preds = torch.stack(max_preds, dim=0) if rescale_with_baseline: