Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to use TensorBoardLogger with fsspec #16320

Merged
merged 5 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source-pytorch/api_references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ core
~optimizer.LightningOptimizer


.. _loggers-api-references:

loggers
-------

Expand Down
3 changes: 2 additions & 1 deletion docs/source-pytorch/common/remote_fs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Working with different filesystems can be accomplished by appending a protocol l
trainer = Trainer(default_root_dir="s3://my_bucket/data/")
trainer.fit(model)

You could pass custom paths to loggers for logging data.

For logging, remote filesystem support depends on the particular logger integration being used. Consult :ref:`the documentation of the individual logger <loggers-api-references>` for more details.

.. code-block:: python

Expand Down
2 changes: 2 additions & 0 deletions src/lightning/pytorch/loggers/csv_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class ExperimentWriter(_FabricExperimentWriter):
Currently, supports to log hyperparameters and metrics in YAML and CSV
format, respectively.

This logger supports logging to remote filesystems via ``fsspec``. Make sure you have it installed.

Args:
log_dir: Directory for the experiment logs
"""
Expand Down
5 changes: 4 additions & 1 deletion src/lightning/pytorch/loggers/tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@

class TensorBoardLogger(Logger, FabricTensorBoardLogger):
r"""
Log to local file system in `TensorBoard <https://www.tensorflow.org/tensorboard>`_ format.
Log to local or remote file system in `TensorBoard <https://www.tensorflow.org/tensorboard>`_ format.

Implemented using :class:`~tensorboardX.SummaryWriter`. Logs are saved to
``os.path.join(save_dir, name, version)``. This is the default logger in Lightning, it comes
preinstalled.

This logger supports logging to remote filesystems via ``fsspec``. Make sure you have it installed
and you don't have tensorflow (otherwise it will use tf.io.gfile instead of fsspec).

Example:

.. testcode::
Expand Down