def METHOD_NAME(self):
    kwargs = dict(
        model=self.model_id,
        data_collator=self.collate_fn,
        train_dataset=self.train_dataset,
        eval_dataset=self.eval_dataset,
        work_dir=self.tmp_dir)
    trainer = build_trainer(
        name=Trainers.image_instance_segmentation, default_args=kwargs)
    trainer.train()
    results_files = os.listdir(self.tmp_dir)
    self.assertIn(f'{trainer.timestamp}.log.json', results_files)
    for i in range(self.max_epochs):
        self.assertIn(f'epoch_{i+1}.pth', results_files)