Skip to content

Commit ed43a16

Browse files
authored
Update test_model_checkpoint_additional_cases.py
1 parent 3ddbdaf commit ed43a16

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/tests_pytorch/callbacks/test_model_checkpoint_additional_cases.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import math
22
from datetime import timedelta
33

4+
import os
45
import pytest
56
import torch
67
import torch.nn as nn
@@ -9,6 +10,7 @@
910

1011
from lightning.pytorch import LightningModule, Trainer, seed_everything
1112
from lightning.pytorch.callbacks import ModelCheckpoint
13+
from lightning.pytorch.demos.boring_classes import BoringModel
1214

1315

1416
class TinyDataset(Dataset):
@@ -210,10 +212,6 @@ def test_model_checkpoint_defer_until_next_validation_when_val_every_2_epochs(tm
210212

211213
def test_model_checkpoint_save_last_link_symlink_bug(tmp_path):
212214
"""Reproduce the bug where save_last='link' and save_top_k=-1 creates a recursive symlink."""
213-
import os
214-
215-
from lightning.pytorch.demos.boring_classes import BoringModel
216-
217215
trainer = Trainer(
218216
default_root_dir=tmp_path,
219217
max_epochs=2,

0 commit comments

Comments
 (0)