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 @@ -1221,11 +1221,13 @@ def model(self) -> Optional[torch.nn.Module]:
12211221 def log_dir (self ) -> Optional [str ]:
12221222 """The directory for the current experiment. Use this to save images to, etc...
12231223
1224- .. code-block :: python
1224+ .. note :: You must call this on all processes. Failing to do so will cause your program to stall forever.
12251225
1226- def training_step(self, batch, batch_idx):
1227- img = ...
1228- save_img(img, self.trainer.log_dir)
1226+ .. code-block:: python
1227+
1228+ def training_step(self, batch, batch_idx):
1229+ img = ...
1230+ save_img(img, self.trainer.log_dir)
12291231 """
12301232 if len (self .loggers ) > 0 :
12311233 if not isinstance (self .loggers [0 ], TensorBoardLogger ):
You can’t perform that action at this time.
0 commit comments