Skip to content

Commit

Permalink
fix a bug in icl/dataset.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhainebula committed Jan 13, 2025
1 parent cef1595 commit 6215289
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions FlagEmbedding/finetune/embedder/decoder_only/icl/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 6215289

Please sign in to comment.