From c169f46a8b3581724f22d907b1ce936d8515b027 Mon Sep 17 00:00:00 2001 From: Siqi Shen <shensq@umich.edu> Date: Tue, 10 Mar 2020 19:50:53 -0400 Subject: [PATCH] fix a but that only one clause will be load for a location --- code/gpt_loader/load_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/gpt_loader/load_data.py b/code/gpt_loader/load_data.py index db508be..b5e78b8 100644 --- a/code/gpt_loader/load_data.py +++ b/code/gpt_loader/load_data.py @@ -480,7 +480,7 @@ class GptDataset_KBERT(Dataset): soft_position_x += list(range(soft_loc, soft_loc + len(utternace_encoded) + 1)) # add the aug, if it is the right place - if len(dq) != 0 and dq[0][0] == i: + while len(dq) != 0 and dq[0][0] == i: comet_output = dq.popleft()[1] comet_encoded = self.tokenizer.encode(text_standardize(comet_output)) x += [self.augment] + comet_encoded -- GitLab