spaCy Loggers

1.0.5 · active · verified Mon Apr 06

spacy-loggers is a Python library that provides logging utilities for spaCy v3.2 and newer, allowing integration with various MLOps tools and machine learning frameworks. It currently supports Weights & Biases, MLflow, ClearML, PyTorch, and CuPy, offering a way to track training metrics and model artifacts independently from the core spaCy library. The current version is 1.0.5, with an active release cadence that regularly introduces new loggers and updates existing ones.

Warnings

Install

Imports

Quickstart

spaCy loggers are typically configured within the `config.cfg` file used for `spacy train`. The `@loggers` key under `[training.logger]` specifies which logger to use. Ensure the respective external logging library (e.g., `wandb`) is installed and configured (e.g., `wandb login`).

# Example config.cfg snippet for Weights & Biases logging
# This file is typically used with `python -m spacy train config.cfg`

[training.logger]
@loggers = "spacy.WandbLogger.v5"
project_name = "my_spacy_project"
remove_config_values = ["paths.train", "paths.dev"]

# To combine with console logging (required for v5+ if console output is desired)
# [training.logger]
# @loggers = "spacy.ChainLogger.v1"
# loggers = [
#   { "@loggers": "spacy.ConsoleLogger.v2" },
#   { "@loggers": "spacy.WandbLogger.v5", "project_name": "my_spacy_project" }
# ]

view raw JSON →