From 750fefac0cc4d6cf7d97087480f4afe688fb3a8b Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 24 Jul 2019 18:55:38 -0400 Subject: [PATCH] made root note address individually testable --- tests/test_models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_models.py b/tests/test_models.py index 4b9ec68bc6..33adb561dd 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -68,6 +68,12 @@ def test_amp_gpu_ddp_slurm_managed(): # correct result and ok accuracy 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 pretrained_model = load_model(exp, save_dir, True)