def _test_fit(self, tmpdir, task_kwargs):
    """Tests that a single batch fit pass completes."""
    dataset = StaticDataset(self.example_train_sample, 4)

    args = self.task_args
    kwargs = dict(**self.task_kwargs)
    kwargs.update(task_kwargs)
    model = self.task(*args, **kwargs)

    trainer = flash.Trainer(default_root_dir=tmpdir, fast_dev_run=True)
    trainer.fit(model, model.process_train_dataset(dataset, batch_size=4))
Tests that a single batch fit pass completes.
tests/helpers/task_tester.py