diff --git a/FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py b/FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py index 43cc8013..e04dc2ad 100644 --- a/FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py +++ b/FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py @@ -125,8 +125,9 @@ def _create_batch_data(self, batch_raw_data): passages.extend(tmp_passages) - if len(teacher_scores) > 0 and len(passages) > 0: - assert len(teacher_scores) == len(passages) + if teacher_scores is not None: + if len(teacher_scores) > 0 and len(passages) > 0: + assert len(teacher_scores) == len(passages) # add icl pairs if self.args.retrieval_use_examples or (