Lightning-AI/LitLogger v2026.03.17
Lightning-AI/LitLogger
Captured source
source ↗Release 2026.03.17
Repository: Lightning-AI/LitLogger
Tag: v2026.03.17
Published: 2026-03-17T13:28:03Z
Prerelease: no
Release notes: This release makes the dict-style Experiment API the primary LitLogger interface for standalone usage, and begins the deprecation of older compatibility surfaces.
Highlights
- The dict-style API is now the recommended API for standalone logging.
- The older module-level helpers and method-style
Experimentlogging helpers are now deprecated in favor of the dict API. litlogger.LightningLoggeris now deprecated.- Docs and examples have been updated to recommend:
- the dict-style API for standalone and inference workloads
- upstream Lightning
LitLoggerfor Lightning/Fabric integration
Recommended API
For standalone usage, prefer litlogger.init() plus dict-style access on the returned experiment:
import litlogger
from litlogger import File, Text
exp = litlogger.init(name="my-run")
exp["model"] = "resnet50"
exp["summary"] = Text("first run")
exp["train/loss"].append(0.42, step=0)
exp["artifacts/config"] = File("config.yaml")
exp.finalize()Deprecations
Module-level compatibility helpers
The older standalone helpers remain available in this release, but are now deprecated in favor of the dict-style API.
This includes patterns such as:
litlogger.log(...)litlogger.log_metrics(...)litlogger.log_file(...)litlogger.log_model(...)litlogger.log_model_artifact(...)litlogger.log_metadata(...)
Method-style Experiment helper API
Method-style logging on Experiment is also deprecated in favor of direct dict-style interaction.
Prefer:
exp["metric"].append(...)instead ofexp.log_metrics(...)exp["artifact"] = File(...)instead ofexp.log_file(...)exp["model"] = Model(...)instead ofexp.log_model(...)/exp.log_model_artifact(...)exp["tag"] = "value"instead ofexp.log_metadata(...)
LightningLogger
litlogger.LightningLogger is now deprecated.
For Lightning/Fabric integration, use upstream Lightning loggers instead:
lightning.pytorch.loggers.LitLoggerpytorch_lightning.loggers.LitLogger
For standalone usage, use the dict-style LitLogger API.
Migration examples
Before
import litlogger
litlogger.init(name="my-run")
litlogger.log_metrics({"loss": 0.42}, step=0)
litlogger.log_file("config.yaml")
litlogger.finalize()After
import litlogger
from litlogger import File
exp = litlogger.init(name="my-run")
exp["loss"].append(0.42, step=0)
exp["config"] = File("config.yaml")
exp.finalize()Lightning/Fabric
Before
from litlogger import LightningLogger logger = LightningLogger(name="train-run")
After
from lightning.pytorch.loggers import LitLogger logger = LitLogger(name="train-run")
Additional improvements
- Updated examples to use the new recommended APIs.
- Updated docs to cross-reference upstream Lightning
LitLogger. - Improved resumed experiment reconstruction for artifacts and artifact series.
- Improved model-series behavior and version handling in the dict-style API.
Compatibility
This release does not remove the deprecated APIs yet. They remain available as compatibility paths, but new code should migrate to the dict-style API or upstream Lightning LitLogger now.
Notability
notability 2.0/10Routine version release, no notable traction