Lightning-AI/pytorch-lightning · error · RuntimeError
NeptuneLogger is no longer supported. Neptune has been sunse
Error message
NeptuneLogger is no longer supported. Neptune has been sunset. Please migrate to LitLogger, the recommended logger for AI experiments. See: https://github.com/lightning-ai/litlogger
What it means
Neptune (the managed experiment-tracking service) was sunset, and Lightning's NeptuneLogger now unconditionally raises RuntimeError in __init__. The message directs users to LitLogger as the replacement. This is a deliberate removal, not a runtime fault.
Source
Thrown at src/lightning/pytorch/loggers/neptune.py:40
class NeptuneLogger:
"""
.. deprecated:: Use :class:`LitLogger` instead.
Neptune has been sunset and this logger is no longer maintained.
Please migrate to **LitLogger**, the recommended logging solution for
tracking AI experiments, metrics, inputs, outputs, and artifacts.
See: https://github.com/Lightning-AI/LitLogger
Raises:
RuntimeError: Always raised when attempting to instantiate this logger.
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
"""Raise an error indicating Neptune logger is no longer supported."""
raise RuntimeError(
"NeptuneLogger is no longer supported. Neptune has been sunset.\n"
"\n"
"Please migrate to LitLogger, the recommended logger for AI experiments.\n"
"See: https://github.com/lightning-ai/litlogger\n"
)
View on GitHub (pinned to 9fed5c27d2)
Solutions
- Migrate to LitLogger: https://github.com/lightning-ai/litlogger
- Or use another supported logger (MLFlowLogger, WandbLogger, TensorBoardLogger, CSVLogger)
- Pin an older lightning version only as a temporary stopgap while migrating
Example fix
# before from lightning.pytorch.loggers.neptune import NeptuneLogger logger = NeptuneLogger(api_token=..., project=...) # after from lightning.pytorch.loggers.litlogger import LitLogger logger = LitLogger(...)
Defensive patterns
Strategy: type-guard
Validate before calling
try:
from lightning.pytorch.loggers.neptune import NeptuneLogger
except ImportError:
NeptuneLogger = None
if NeptuneLogger is not None:
logger = NeptuneLogger(...) # will raise — migrate instead Type guard
def make_logger(name: str, **kw):
if name == "neptune":
raise RuntimeError("Neptune is sunset; use LitLogger")
return LOGGER_REGISTRY[name](**kw) Prevention
- Search codebase for NeptuneLogger before upgrading Lightning
- Migrate config-driven logger selection to LitLogger/MLFlow/W&B
When it happens
Trigger: Any attempt to instantiate lightning.pytorch.loggers.neptune.NeptuneLogger(...) regardless of arguments or environment.
Common situations: Old training scripts or tutorials referencing NeptuneLogger; upgrading Lightning to a version containing the removal while code still imports/instantiates the logger.
Related errors
- Experiment is not initialized
- `synchronous` requires mlflow>=2.8.0
- Providing log_model={log_model} and offline={offline} is an
- LitLogger does not support `log_graph`
- Starting from v1.9.0, `tensorboardX` has been removed as a d
AI-assisted analysis of Lightning-AI/pytorch-lightning@9fed5c27d2 (2026-08-28).
Data as JSON: /api/errors/9a0381662b70c2e2.
Report an issue: GitHub.