made root note address individually testable

This commit is contained in:
William Falcon 2019-07-24 18:55:38 -04:00
parent ccd4018dd9
commit 750fefac0c
1 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,12 @@ def test_amp_gpu_ddp_slurm_managed():
# correct result and ok accuracy # correct result and ok accuracy
assert result == 1, 'amp + ddp model failed to complete' assert result == 1, 'amp + ddp model failed to complete'
# test root model address
assert trainer.resolve_root_node_address('abc') == 'abc'
assert trainer.resolve_root_node_address('abc[23]') == 'abc23'
assert trainer.resolve_root_node_address('abc[23-24]') == 'abc24'
assert trainer.resolve_root_node_address('abc[23-24, 45-40, 40]') == 'abc23'
# test model loading # test model loading
pretrained_model = load_model(exp, save_dir, True) pretrained_model = load_model(exp, save_dir, True)