Skip to content

Commit

Permalink
hmm need to sort the flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Parry-Parry committed Nov 13, 2024
1 parent 1fb36dd commit 9fcc7a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rankers/datasets/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def __getitem__(self, idx):
texts, scores = texts[:self.group_size], scores[:self.group_size]
else:
texts, scores = zip(*random.sample(list(zip(doc_id_a_text + doc_id_b_text, doc_id_a_scores + doc_id_b_scores)), self.group_size))
return (query, texts, scores)
return (query, texts, scores)
return (query, doc_id_a_text + doc_id_b_text, doc_id_a_scores + doc_id_b_scores)
else:
if len(doc_id_b_text) > (self.n_neg): doc_id_b_text = random.sample(doc_id_b_text, self.group_size)
return (query, doc_id_a_text + doc_id_b_text)
Expand Down

0 comments on commit 9fcc7a7

Please sign in to comment.