recbole.data.dataloader.user_dataloader¶
- class recbole.data.dataloader.user_dataloader.UserDataLoader(config, dataset, sampler, shuffle=False)[source]¶
Bases:
AbstractDataLoader
UserDataLoader
will return a batch of data which only contains user-id when it is iterated.- Parameters:
- shuffle¶
Whether the dataloader will be shuffle after a round. However, in
UserDataLoader
, it’s guaranteed to beTrue
.- Type:
bool
- batch_size: int | None¶
- collate_fn(index)[source]¶
Collect the sampled index, and apply neg_sampling or other methods to get the final data.
- dataset: Dataset[T_co]¶
- drop_last: bool¶
- num_workers: int¶
- pin_memory: bool¶
- pin_memory_device: str¶
- prefetch_factor: int | None¶
- sampler: Sampler | Iterable¶
- timeout: float¶