Skip to content

Commit 34bcdc1

Browse files
committed
defaults
1 parent 2848bdc commit 34bcdc1

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

pytorch_lightning/callbacks/model_checkpoint.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ def __init__(
162162
save_last: Optional[bool] = None,
163163
save_top_k: Optional[int] = None,
164164
save_weights_only: bool = False,
165-
every_n_epochs: int = 1,
166-
every_n_batches: int = -1,
167165
mode: str = "min",
168166
every_n_epochs: int = 1,
169167
every_n_batches: int = -1,

tests/checkpointing/test_model_checkpoint.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -516,13 +516,9 @@ def test_invalid_every_n_epoch(tmpdir):
516516

517517
def test_invalid_every_n_batches(tmpdir):
518518
""" Test that an exception is raised for every_n_batches = 0 or < -1. """
519-
with pytest.raises(
520-
MisconfigurationException, match=r'Invalid value for every_n_batches=0*'
521-
):
519+
with pytest.raises(MisconfigurationException, match=r'Invalid value for every_n_batches=0*'):
522520
ModelCheckpoint(dirpath=tmpdir, every_n_batches=0)
523-
with pytest.raises(
524-
MisconfigurationException, match=r'Invalid value for every_n_batches=-2*'
525-
):
521+
with pytest.raises(MisconfigurationException, match=r'Invalid value for every_n_batches=-2*'):
526522
ModelCheckpoint(dirpath=tmpdir, every_n_batches=-2)
527523

528524
# These should not fail

0 commit comments

Comments
 (0)