Skip to content

Commit

Permalink
Merge branch 'master' into refactor/make-clean
Browse files Browse the repository at this point in the history
  • Loading branch information
s-rog authored Dec 21, 2020
2 parents 594e47a + c8eda3f commit 74dd2c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions pytorch_lightning/callbacks/model_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"""

from copy import deepcopy
import numbers
import os
import re
from copy import deepcopy
from pathlib import Path
import re
from typing import Any, Dict, Optional, Union

import numpy as np
Expand Down Expand Up @@ -302,8 +302,7 @@ def __init_ckpt_dir(self, filepath, dirpath, filename, save_top_k):
and len(self._fs.ls(dirpath)) > 0
):
rank_zero_warn(
f"Checkpoint directory {dirpath} exists and is not empty. With save_top_k={save_top_k},"
" all files in this directory will be deleted when a checkpoint is saved!"
f"Checkpoint directory {dirpath} exists and is not empty."
)

if dirpath and self._fs.protocol == 'file':
Expand Down
2 changes: 1 addition & 1 deletion tests/models/test_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_multi_gpu_none_backend(tmpdir):
tpipes.run_model_test(trainer_options, model)


@pytest.mark.skipif(not torch.cuda.is_available(), reason="test requires GPU machine")
@pytest.mark.skipif(torch.cuda.device_count() < 2, reason="test requires multi-GPU machine")
@pytest.mark.parametrize('gpus', [1, [0], [1]])
def test_single_gpu_model(tmpdir, gpus):
"""Make sure single GPU works (DP mode)."""
Expand Down

0 comments on commit 74dd2c5

Please sign in to comment.