class_docstr: 使用 JittorSingleDriver 测试基类的函数
class_docstr_tok: ["\u4f7f\u7528","JittorSingleDriver","\u6d4b\u8bd5\u57fa\u7c7b\u7684\u51fd\u6570"]
docstr: 测试替换了 sampler 后 get_dataloader_args 的表现
docstr_tok: ["\u6d4b\u8bd5\u66ff\u6362\u4e86","sampler","\u540e","get_dataloader_args","\u7684\u8868\u73b0"]
code: def test_get_dataloader_args_with_randomsampler(
      self, batch_size, shuffle, drop_last, use_dataloader
  ):
      """
      测试替换了 sampler 后 get_dataloader_args 的表现
      """
      dataset = JittorNormalDataset()
      dataloader = get_dataloader(
          dataset,
          use_dataloader=use_dataloader,
          batch_size=batch_size,
          sampler=RandomSampler(dataset, shuffle=shuffle),
          shuffle=shuffle,
          drop_last=drop_last,
      )
  
      res = JittorSingleDriver.get_dataloader_args(dataloader)
  
      assert isinstance(res.dataset, JittorNormalDataset)
      assert isinstance(res.sampler, RandomSampler)
      assert res.shuffle == shuffle
      assert res.batch_size == batch_size
      assert res.drop_last == drop_last
  
imports: import pytest
  from copy import deepcopy
  from pathlib import Path
  from fastNLP.core.drivers.jittor_driver import JittorSingleDriver
  from fastNLP.core.samplers import ReproduceBatchSampler, RandomSampler
  from fastNLP.core.dataloaders import JittorDataLoader
  from tests.helpers.models.jittor_model import JittorNormalModel_Classification_1
  from tests.helpers.datasets.jittor_data import JittorNormalDataset, JittorNormalXYDataset
  from tests.helpers.datasets.torch_data import TorchNormalDataset
  from tests.helpers.models.torch_model import TorchNormalModel_Classification_1
  from fastNLP.envs.distributed import rank_zero_rm
  from fastNLP.envs.imports import _NEED_IMPORT_JITTOR, _NEED_IMPORT_TORCH
label_desc: Use image node_id 14 for calling the TestJittorDriverFunctions obj's underlying member method code with example usage: obj.test_get_dataloader_args_with_randomsampler(batch_size, shuffle, drop_last, use_dataloader) without return types