We recently switched our python logging to use json formatting. Its a lot easier to ingest, filter, and work with from servers.
import logging
import wandb
# Simple example json formatter
logging.basicConfig(
format='{"time": "%(asctime)s", "level": "%(levelname)s", "message": "%(message)s"}',
level=logging.DEBUG
)
# Initialize W&B
wandb.init(
entity="myentity",
project="test",
)
# Log structured data
logging.info("Training started")
logging.debug("Some debug info")
logging.warning("High loss detected")
However I was surprised that wandb doesn’t seem to recognize/parse these structured logs in any way, making them tough to read on the wandb UI and no useful features like filtering by levels?
