def test_multi_gpu_model_ddp_test_only(tmpdir, as_module): # call the script call_training_script(ddp_model, CLI_ARGS, "test", tmpdir, as_module=as_module) # load the results of the script result_path = os.path.join(tmpdir, "ddp.result") result = torch.load(result_path) # verify the file wrote the expected outputs assert result["status"] == "complete"
def test_multi_gpu_model_ddp_test_only(tmpdir): # call the script call_training_script(ddp_model, CLI_ARGS, 'test', tmpdir) # load the results of the script result_path = os.path.join(tmpdir, 'ddp.result') result = torch.load(result_path) # verify the file wrote the expected outputs assert result['status'] == 'complete'
def test_multi_gpu_model_ddp_fit_test(tmpdir, as_module): # call the script call_training_script(ddp_model, CLI_ARGS, "fit_test", tmpdir, timeout=20, as_module=as_module) # load the results of the script result_path = os.path.join(tmpdir, "ddp.result") result = torch.load(result_path) # verify the file wrote the expected outputs assert result["status"] == "complete" model_outs = result["result"] for out in model_outs: assert out["test_acc"] > 0.7
def test_multi_gpu_model_ddp_fit_test(tmpdir): # call the script call_training_script(ddp_model, CLI_ARGS, 'fit_test', tmpdir, timeout=20) # load the results of the script result_path = os.path.join(tmpdir, 'ddp.result') result = torch.load(result_path) # verify the file wrote the expected outputs assert result['status'] == 'complete' model_outs = result['result'] for out in model_outs: assert out['test_acc'] > 0.7
def test_multi_gpu_model_ddp_fit_only(tmpdir, cli_args): # call the script std, err = call_training_script(ddp_model, cli_args, 'fit', tmpdir, timeout=120) # load the results of the script result_path = os.path.join(tmpdir, 'ddp.result') result = torch.load(result_path) # verify the file wrote the expected outputs assert result['status'] == 'complete'