File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/lightning/pytorch/trainer Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1167,11 +1167,13 @@ def model(self) -> Optional[torch.nn.Module]:
11671167 def log_dir (self ) -> Optional [str ]:
11681168 """The directory for the current experiment. Use this to save images to, etc...
11691169
1170- .. code-block :: python
1170+ .. note :: You must call this on all processes. Failing to do so will cause your program to stall forever.
11711171
1172- def training_step(self, batch, batch_idx):
1173- img = ...
1174- save_img(img, self.trainer.log_dir)
1172+ .. code-block:: python
1173+
1174+ def training_step(self, batch, batch_idx):
1175+ img = ...
1176+ save_img(img, self.trainer.log_dir)
11751177 """
11761178 if len (self .loggers ) > 0 :
11771179 if not isinstance (self .loggers [0 ], TensorBoardLogger ):
You can’t perform that action at this time.
0 commit comments