def METHOD_NAME(self):
    global _global_iter
    _global_iter = 0
    json_cfg = {
        'task': 'image_classification',
        'train': {
            'work_dir': self.tmp_dir,
            'dataloader': {
                'batch_size_per_gpu': 2,
                'workers_per_gpu': 1
            },
            'optimizer': {
                'type': 'SGD',
                'lr': 0.01,
                'options': {
                    'grad_clip': {
                        'max_norm': 2.0
                    }
                }
            },
            'lr_scheduler': {
                'type': 'StepLR',
                'step_size': 2,
                'options': {
                    'warmup': {
                        'type': 'LinearWarmup',
                        'warmup_iters': 2
                    }
                }
            },
            'hooks': [{
                'type': 'CheckpointHook',
                'interval': 1
            }]
        }
    }
    config_path = os.path.join(self.tmp_dir, ModelFile.CONFIGURATION)
    with open(config_path, 'w') as f:
        json.dump(json_cfg, f)
    trainer_name = Trainers.default
    kwargs = dict(
        cfg_file=config_path,
        model=DummyModel(),
        data_collator=None,
        train_dataset=dummy_dataset,
        max_epochs=2)
    trainer = build_trainer(trainer_name, kwargs)
    trainer.train()
    results_files = os.listdir(self.tmp_dir)
    self.assertIn(f'{LogKeys.EPOCH}_1.pth', results_files)
    self.assertIn(f'{LogKeys.EPOCH}_2.pth', results_files)
    output_files = os.listdir(
        os.path.join(self.tmp_dir, ModelFile.TRAIN_OUTPUT_DIR))
    self.assertIn(ModelFile.CONFIGURATION, output_files)
    self.assertIn(ModelFile.TORCH_MODEL_BIN_FILE, output_files)
    copy_src_files = os.listdir(SRC_DIR)
    self.assertIn(copy_src_files[0], output_files)
    self.assertIn(copy_src_files[-1], output_files)