(tmp_path: pathlib.Path, config_name: str)
| 13 | |
| 14 | @pytest.mark.parametrize("config_name", ["debug"]) |
| 15 | def test_train(tmp_path: pathlib.Path, config_name: str): |
| 16 | config = dataclasses.replace( |
| 17 | _config._CONFIGS_DICT[config_name], # noqa: SLF001 |
| 18 | batch_size=2, |
| 19 | checkpoint_base_dir=str(tmp_path / "checkpoint"), |
| 20 | exp_name="test", |
| 21 | overwrite=False, |
| 22 | resume=False, |
| 23 | num_train_steps=2, |
| 24 | log_interval=1, |
| 25 | ) |
| 26 | train.main(config) |
| 27 | |
| 28 | # test resuming |
| 29 | config = dataclasses.replace(config, resume=True, num_train_steps=4) |
| 30 | train.main(config) |
nothing calls this directly
no outgoing calls
no test coverage detected