Commit 392c577 1 parent 98e2f56 commit 392c577 Copy full SHA for 392c577
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 16
16
import torch
17
17
from torch .utils .data import DataLoader
18
18
19
- from pytorch_lightning import LightningModule , Trainer
19
+ from pytorch_lightning import Trainer
20
20
from pytorch_lightning .loops import EvaluationEpochLoop
21
+ from pytorch_lightning .utilities .model_helpers import is_overridden
21
22
from tests .helpers .boring_model import BoringModel , RandomDataset
22
23
from tests .helpers .runif import RunIf
23
24
@@ -120,8 +121,8 @@ def on_advance_end(self):
120
121
super ().on_advance_end ()
121
122
122
123
model = TestModel ()
123
- # make sure this hook is not overridden
124
- model . test_epoch_end = LightningModule . test_epoch_end
124
+ model . test_epoch_end = None
125
+ assert not is_overridden ( " test_epoch_end" , model )
125
126
126
127
trainer = Trainer (default_root_dir = tmpdir , fast_dev_run = 3 )
127
128
trainer .test_loop .connect (TestLoop ())
You can’t perform that action at this time.
0 commit comments