From 8f181f81b6510f609eb47a644f7700d45aad63e4 Mon Sep 17 00:00:00 2001 From: Ethan Harris Date: Thu, 8 Apr 2021 13:56:59 +0100 Subject: [PATCH] Fix DDP_SPAWN compatibility with bug_report_model.py --- pl_examples/bug_report_model.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pl_examples/bug_report_model.py b/pl_examples/bug_report_model.py index 4d9a23f48ca5d..b8e45512bb7c7 100644 --- a/pl_examples/bug_report_model.py +++ b/pl_examples/bug_report_model.py @@ -126,12 +126,13 @@ def configure_optimizers(self): # args = parser.parse_args(opt) -def test_run(): +class TestModel(BoringModel): + + def on_train_epoch_start(self) -> None: + print('override any method to prove your bug') - class TestModel(BoringModel): - def on_train_epoch_start(self) -> None: - print('override any method to prove your bug') +def test_run(): # fake data train_data = torch.utils.data.DataLoader(RandomDataset(32, 64))