transformer_rankers.datasets.dataset.QueryPosDocNegDocDataset¶
-
class
transformer_rankers.datasets.dataset.
QueryPosDocNegDocDataset
(data, tokenizer, data_partition, negative_sampler, task_type, max_seq_len, sample_data, cache_path, generate_inverted_pairs=False)[source]¶ Bases:
torch.utils.data.dataset.Dataset
Dataset for pairwise learning with <Query,PosDoc,NegDoc> triplets. For each batch both the positive and the negative documents are kept in memory.
-
__init__
(data, tokenizer, data_partition, negative_sampler, task_type, max_seq_len, sample_data, cache_path, generate_inverted_pairs=False)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(data, tokenizer, data_partition, …)Initialize self.
-