mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
add rank warning (#1428)
* add rank warning * changelog * use rank_zero_warn * user trainer_init * replace warnings * fix test * flake8 * docs * changelog * bug lol
This commit is contained in:
@@ -331,14 +331,11 @@ def test_tbptt_cpu_model(tmpdir):
|
||||
assert result == 1, 'training failed to complete'
|
||||
|
||||
|
||||
@pytest.mark.skipif(not torch.cuda.is_available(), reason="test requires GPU machine")
|
||||
def test_single_gpu_model(tmpdir):
|
||||
"""Make sure single GPU works (DP mode)."""
|
||||
tutils.reset_seed()
|
||||
|
||||
if not torch.cuda.is_available():
|
||||
warnings.warn('test_single_gpu_model cannot run.'
|
||||
' Rerun on a GPU node to run this test')
|
||||
return
|
||||
model, hparams = tutils.get_default_model()
|
||||
|
||||
trainer_options = dict(
|
||||
|
||||
Reference in New Issue
Block a user