Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ trainer = Trainer(logger=loggers.MLFlowLogger())
# neptune
trainer = Trainer(logger=loggers.NeptuneLogger())

# neptune scale
trainer = Trainer(logger=loggers.NeptuneScaleLogger())

# ... and dozens more
```

Expand Down
4 changes: 3 additions & 1 deletion docs/source-pytorch/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def _load_py_module(name: str, location: str) -> ModuleType:
# TODO: these are missing objects.inv
# "comet_ml": ("https://www.comet.com/docs/v2/", None),
# "neptune": ("https://docs.neptune.ai/", None),
# "neptune scale": ("https://docs-beta.neptune.ai/", None),
# "wandb": ("https://docs.wandb.ai//", None),
}
nitpicky = True
Expand Down Expand Up @@ -477,6 +478,7 @@ def _load_py_module(name: str, location: str) -> ModuleType:
("py:meth", "move_data_to_device"),
("py:class", "neptune.Run"),
("py:class", "neptune.handler.Handler"),
("py:class", "neptune_scale.Run"),
("py:meth", "on_after_batch_transfer"),
("py:meth", "on_before_batch_transfer"),
("py:meth", "on_save_checkpoint"),
Expand Down Expand Up @@ -621,7 +623,7 @@ def package_list_from_file(file):
from lightning.pytorch.cli import _JSONARGPARSE_SIGNATURES_AVAILABLE as _JSONARGPARSE_AVAILABLE
from lightning.pytorch.utilities.imports import _TORCHVISION_AVAILABLE
from lightning.fabric.loggers.tensorboard import _TENSORBOARD_AVAILABLE, _TENSORBOARDX_AVAILABLE
from lightning.pytorch.loggers.neptune import _NEPTUNE_AVAILABLE
from lightning.pytorch.loggers.neptune import _NEPTUNE_AVAILABLE, _NEPTUNE_SCALE_AVAILABLE
from lightning.pytorch.loggers.comet import _COMET_AVAILABLE
from lightning.pytorch.loggers.mlflow import _MLFLOW_AVAILABLE
from lightning.pytorch.loggers.wandb import _WANDB_AVAILABLE
Expand Down
1 change: 1 addition & 0 deletions docs/source-pytorch/extensions/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The following are loggers we support:
CSVLogger
MLFlowLogger
NeptuneLogger
NeptuneScaleLogger
TensorBoardLogger
WandbLogger

Expand Down
41 changes: 39 additions & 2 deletions docs/source-pytorch/visualize/supported_exp_managers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Here's the full documentation for the :class:`~lightning.pytorch.loggers.MLFlowL

----

Neptune.ai
Neptune 2.x
==========
To use `Neptune.ai <https://www.neptune.ai/>`_ first install the neptune package:
To use `Neptune 2.x <https://docs-legacy.neptune.ai/>`_ first install the neptune package:

.. code-block:: bash

Expand Down Expand Up @@ -101,6 +101,43 @@ Here's the full documentation for the :class:`~lightning.pytorch.loggers.Neptune

----

Neptune 3.x (Neptune Scale)
==========
To use `Neptune 3.x <https://docs.neptune.ai/>`_ first install the neptune-scale package:

.. code-block:: bash

pip install neptune-scale


Configure the logger and pass it to the :class:`~lightning.pytorch.trainer.trainer.Trainer`:

.. testcode::
:skipif: not _NEPTUNE_SCALE_AVAILABLE

from neptune_scale import Run
from lightning.pytorch.loggers import NeptuneScaleLogger

neptune_scale_logger = NeptuneScaleLogger(
api_key=<YOUR_NEPTUNE_SCALE_API_KEY>, # replace with your own
project=<YOUR_NEPTUNE_SCALE_WORKSPACE>/<YOUR_NEPTUNE_SCALE_PROJECT>, # replace with your own
)
trainer = Trainer(logger=neptune_scale_logger)

Access the Neptune Scale logger from any function (except the LightningModule *init*) to use its API for tracking advanced artifacts

.. code-block:: python

class LitModel(LightningModule):
def any_lightning_module_function_or_hook(self):
neptune_scale_logger = self.logger.experiment
neptune_scale_logger.log_metrics(data={"path/to/metadata": metadata}, step=step)
neptune_scale_logger.log_configs(data={"path/to/config": config})

Here's the full documentation for the :class:`~lightning.pytorch.loggers.NeptuneScaleLogger`.

----

Tensorboard
===========
`TensorBoard <https://pytorch.org/docs/stable/tensorboard.html>`_ can be installed with:
Expand Down
1 change: 1 addition & 0 deletions requirements/pytorch/loggers.info
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# all supported loggers. this list is here as a reference, but they are not installed in CI

neptune >=1.0.0
neptune-scale >= 0.12.0
comet-ml >=3.31.0
mlflow >=1.0.0
wandb >=0.12.10
Expand Down
9 changes: 9 additions & 0 deletions src/lightning/pytorch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed logger_connector has edge case where step can be a float ([#20692](https://github.com/Lightning-AI/pytorch-lightning/issues/20692))


---

## [unreleased] - 2025-03-31

### Added

- Add support for Neptune Scale logger ([#20686](https://github.com/Lightning-AI/pytorch-lightning/pull/20686))


---

## [2.5.1] - 2025-03-18
Expand Down
13 changes: 11 additions & 2 deletions src/lightning/pytorch/loggers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@
from lightning.pytorch.loggers.csv_logs import CSVLogger
from lightning.pytorch.loggers.logger import Logger
from lightning.pytorch.loggers.mlflow import MLFlowLogger
from lightning.pytorch.loggers.neptune import NeptuneLogger
from lightning.pytorch.loggers.neptune import NeptuneLogger, NeptuneScaleLogger
from lightning.pytorch.loggers.tensorboard import TensorBoardLogger
from lightning.pytorch.loggers.wandb import WandbLogger

__all__ = ["CometLogger", "CSVLogger", "Logger", "MLFlowLogger", "TensorBoardLogger", "WandbLogger", "NeptuneLogger"]
__all__ = [
"CometLogger",
"CSVLogger",
"Logger",
"MLFlowLogger",
"TensorBoardLogger",
"WandbLogger",
"NeptuneLogger",
"NeptuneScaleLogger",
]
Loading
Loading