MCPcopy Create free account
hub / github.com/Physical-Intelligence/openpi / test_train

Function test_train

scripts/train_test.py:15–30  ·  view source on GitHub ↗
(tmp_path: pathlib.Path, config_name: str)

Source from the content-addressed store, hash-verified

13
14@pytest.mark.parametrize("config_name", ["debug"])
15def 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)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected