def METHOD_NAME(self):
    os.makedirs(self.WORKSPACE, exist_ok=True)
    config_file = os.path.join(self.WORKSPACE, ModelFile.CONFIGURATION)
    with open(config_file, 'w') as writer:
        json.dump(self.finetune_cfg, writer, indent=4)
    pretrained_model = 'damo/ofa_ocr-recognition_scene_base_zh'
    args = dict(
        model=pretrained_model,
        work_dir=self.WORKSPACE,
        train_dataset=MsDataset.load(
            'ocr_fudanvi_zh',
            subset_name='scene',
            namespace='modelscope',
            split='train[800:900]',
            download_mode=DownloadMode.REUSE_DATASET_IF_EXISTS),
        eval_dataset=MsDataset.load(
            'ocr_fudanvi_zh',
            subset_name='scene',
            namespace='modelscope',
            split='test[:20]',
            download_mode=DownloadMode.REUSE_DATASET_IF_EXISTS),
        cfg_file=config_file)
    trainer = build_trainer(name=Trainers.ofa, default_args=args)
    trainer.train()
    self.assertIn(
        ModelFile.TORCH_MODEL_BIN_FILE,
        os.listdir(
            os.path.join(self.WORKSPACE, ModelFile.TRAIN_OUTPUT_DIR)))