From 05005a962fe7c4cc6eb56aeffb48c6de2e4f4c3b Mon Sep 17 00:00:00 2001 From: billvsme <994171686@qq.com> Date: Fri, 15 Nov 2024 16:26:19 +0800 Subject: [PATCH] fix DecoderOnlyEmbedderICLSameDatasetTrainDataset category index error --- FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py b/FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py index 802aa39d..43cc8013 100644 --- a/FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py +++ b/FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py @@ -113,8 +113,8 @@ def _create_batch_data(self, batch_raw_data): add_special_tokens=False, )['input_ids'] ) - for i in range(len(tmp_passages)): - tmp_passages[i] += self.args.icl_suffix_str + for j in range(len(tmp_passages)): + tmp_passages[j] += self.args.icl_suffix_str else: if self.args.passage_instruction_for_retrieval is not None: tmp_passages = [