recbole.data.dataloader.general_dataloader

class recbole.data.dataloader.general_dataloader.FullSortEvalDataLoader(config, dataset, sampler, shuffle=False)[source]

Bases: recbole.data.dataloader.abstract_dataloader.AbstractDataLoader

FullSortEvalDataLoader is a dataloader for full-sort evaluation. In order to speed up calculation, this dataloader would only return then user part of interactions, positive items and used items. It would not return negative items.

Parameters
  • config (Config) – The config of dataloader.

  • dataset (Dataset) – The dataset of dataloader.

  • sampler (Sampler) – The sampler of dataloader.

  • shuffle (bool, optional) – Whether the dataloader will be shuffle after a round. Defaults to False.

property pr_end

This property marks the end of dataloader.pr which is used in __next__().

class recbole.data.dataloader.general_dataloader.NegSampleEvalDataLoader(config, dataset, sampler, shuffle=False)[source]

Bases: recbole.data.dataloader.abstract_dataloader.NegSampleDataLoader

NegSampleEvalDataLoader is a dataloader for neg-sampling evaluation. It is similar to TrainDataLoader which can generate negative items, and this dataloader also permits that all the interactions corresponding to each user are in the same batch and positive interactions are before negative interactions.

Parameters
  • config (Config) – The config of dataloader.

  • dataset (Dataset) – The dataset of dataloader.

  • sampler (Sampler) – The sampler of dataloader.

  • shuffle (bool, optional) – Whether the dataloader will be shuffle after a round. Defaults to False.

property pr_end

This property marks the end of dataloader.pr which is used in __next__().

class recbole.data.dataloader.general_dataloader.TrainDataLoader(config, dataset, sampler, shuffle=False)[source]

Bases: recbole.data.dataloader.abstract_dataloader.NegSampleDataLoader

TrainDataLoader is a dataloader for training. It can generate negative interaction when training_neg_sample_num is not zero. For the result of every batch, we permit that every positive interaction and its negative interaction must be in the same batch.

Parameters
  • config (Config) – The config of dataloader.

  • dataset (Dataset) – The dataset of dataloader.

  • sampler (Sampler) – The sampler of dataloader.

  • shuffle (bool, optional) – Whether the dataloader will be shuffle after a round. Defaults to False.

property pr_end

This property marks the end of dataloader.pr which is used in __next__().