docstr: 测试 set_dist_repro_dataloader 中 dist 为 'unrepeatdist'、dataloader 为一般情况的表现
  此时应该返回一个新的 dataloader，且将 sampler 替换为 UnrepeatedSequentialSampler，并正确地设置了分布式相关
  的属性
docstr_tok: ["\u6d4b\u8bd5","set_dist_repro_dataloader","\u4e2d","dist","\u4e3a","'unrepeatdist'\u3001dataloader","\u4e3a\u4e00\u822c\u60c5\u51b5\u7684\u8868\u73b0","\u6b64\u65f6\u5e94\u8be5\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684","dataloader\uff0c\u4e14\u5c06","sampler","\u66ff\u6362\u4e3a","UnrepeatedSequentialSampler\uff0c\u5e76\u6b63\u786e\u5730\u8bbe\u7f6e\u4e86\u5206\u5e03\u5f0f\u76f8\u5173","\u7684\u5c5e\u6027"]
code: def test_with_dist_unrepeat_dataloader_normal(self, shuffle):
      """
      测试 set_dist_repro_dataloader 中 dist 为 'unrepeatdist'、dataloader 为一般情况的表现
      此时应该返回一个新的 dataloader，且将 sampler 替换为 UnrepeatedSequentialSampler，并正确地设置了分布式相关
      的属性
      """
      driver = generate_driver(10, 10, device=self.device)
      dataloader = DataLoader(
          self.dataset, batch_size=4, shuffle=shuffle
      )
      replaced_loader = driver.set_dist_repro_dataloader(
          dataloader, "unrepeatdist", False
      )
  
      assert not (replaced_loader is dataloader)
      assert isinstance(replaced_loader.batch_sampler, BatchSampler)
      assert not (
          replaced_loader.batch_sampler is dataloader.batch_sampler
      )
      assert isinstance(
          replaced_loader.batch_sampler.sampler,
          UnrepeatedSequentialSampler,
      )
      assert replaced_loader.batch_sampler.batch_size == 4
      assert replaced_loader.drop_last == dataloader.drop_last
      self.check_distributed_sampler(
          replaced_loader.batch_sampler.sampler
      )
      comm.barrier()
  
imports: import os
  import sys
  import pytest
  from pathlib import Path
  from fastNLP.core.drivers.oneflow_driver.ddp import OneflowDDPDriver
  from fastNLP import prepare_oneflow_dataloader
  from fastNLP.core.samplers import RandomSampler, UnrepeatedSampler, BucketedBatchSampler, UnrepeatedRandomSampler, UnrepeatedSequentialSampler
  from tests.helpers.models.oneflow_model import OneflowNormalModel_Classification_1
  from tests.helpers.datasets.oneflow_data import OneflowNormalDataset, OneflowNormalXYDataset
  from tests.helpers.utils import recover_logger
  from fastNLP.envs.distributed import rank_zero_rm
  from fastNLP import logger
  from fastNLP.core.drivers.oneflow_driver.dist_utils import fastnlp_oneflow_all_gather
  from fastNLP.envs.imports import _NEED_IMPORT_ONEFLOW
label_desc: Use image node_id 14 for calling the TestSetDistReproDataloader obj's underlying member method code with example usage: obj.test_with_dist_unrepeat_dataloader_normal(shuffle) without return types