Skip to content

Commit c6cb634

Browse files
manangoel99rohitgr7awaelchli
authored
Add usage of Jupyter magic command for loggers (#12333)
Co-authored-by: Rohit Gupta <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]>
1 parent 42169a2 commit c6cb634

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/source/common/loggers.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,19 @@ The :class:`~pytorch_lightning.loggers.TensorBoardLogger` is available anywhere
175175
some_img = fake_image()
176176
self.logger.experiment.add_image("generated_images", some_img, 0)
177177

178+
To see your logs, run the following command in the terminal:
179+
180+
.. code-block:: bash
181+
182+
tensorboard --logdir=<logging_folder>
183+
184+
To visualize tensorboard in a jupyter notebook environment, run the following command in a jupyter cell:
185+
186+
.. code-block:: bash
187+
188+
%reload_ext tensorboard
189+
%tensorboard --logdir=<logging_folder>
190+
178191
.. seealso::
179192
:class:`~pytorch_lightning.loggers.TensorBoardLogger` docs.
180193

@@ -217,6 +230,23 @@ The :class:`~pytorch_lightning.loggers.WandbLogger` is available anywhere except
217230
# Option 2 for specifically logging images
218231
self.logger.log_image(key="generated_images", images=[some_img])
219232
233+
To visualize using wandb in a jupyter notebook environment use the following magic line command:
234+
235+
.. code-block:: shell
236+
237+
%%wandb
238+
239+
# Your training loop here
240+
241+
To display any existing dashboards, sweeps or reports directly in your notebook using the %wandb magic:
242+
243+
.. code-block:: shell
244+
245+
# Display a project workspace
246+
%wandb USERNAME/PROJECT
247+
248+
More information is available `here <https://docs.wandb.ai/guides/track/jupyter>`__.
249+
220250
.. seealso::
221251
- :class:`~pytorch_lightning.loggers.WandbLogger` docs.
222252
- `W&B Documentation <https://docs.wandb.ai/integrations/lightning>`__

0 commit comments

Comments
 (0)