Skip to content

Commit

Permalink
Merge pull request #1330 from hanhainebula/master
Browse files Browse the repository at this point in the history
fix a bug in icl/dataset.py
  • Loading branch information
hanhainebula authored Jan 13, 2025
2 parents cef1595 + 6215289 commit b7efd28
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 b7efd28

Please sign in to comment.