class_docstr: :class:`NegSampleEvalDataLoader` is a dataloader for neg-sampling evaluation.
  It is similar to :class:`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.
  
  Args:
      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``.
code: def __init__(self, config, dataset, sampler, shuffle=False):
      self.logger = getLogger()
      phase = sampler.phase if sampler is not None else "test"
      self._set_neg_sample_args(
          config,
          dataset,
          InputType.POINTWISE,
          config[f"{phase}_neg_sample_args"],
      )
      if (
          self.neg_sample_args["distribution"] != "none"
          and self.neg_sample_args["sample_num"] != "none"
      ):
          user_num = dataset.user_num
          dataset.sort(by=dataset.uid_field, ascending=True)
          self.uid_list = []
          start, end = dict(), dict()
          for i, uid in enumerate(
              dataset.inter_feat[dataset.uid_field].numpy()
          ):
              if uid not in start:
                  self.uid_list.append(uid)
                  start[uid] = i
              end[uid] = i
          self.uid2index = np.array([None] * user_num)
          self.uid2items_num = np.zeros(user_num, dtype=np.int64)
          for uid in self.uid_list:
              self.uid2index[uid] = slice(start[uid], end[uid] + 1)
              self.uid2items_num[uid] = end[uid] - start[uid] + 1
          self.uid_list = np.array(self.uid_list)
          self.sample_size = len(self.uid_list)
      else:
          self.sample_size = len(dataset)
      if shuffle:
          self.logger.warnning("NegSampleEvalDataLoader can't shuffle")
          shuffle = False
      super().__init__(config, dataset, sampler, shuffle=shuffle)
  
imports: import numpy
  import torch
  from logging import getLogger
  from recbole.data.dataloader.abstract_dataloader import AbstractDataLoader, NegSampleDataLoader
  from recbole.data.interaction import Interaction, cat_interactions
  from recbole.utils import InputType, ModelType
label_desc: Use image node_id 1 to create a new NegSampleEvalDataLoader object from inherited base classes: NegSampleDataLoader with example: obj = NegSampleEvalDataLoader(config, dataset, sampler, shuffle)