autocast.logging.wandb#
Utility helpers for configuring Weights & Biases logging.
- create_notebook_logger(project='autocast-notebooks', name=None, *, enabled=True, tags=None, watch=None)[source]#
Create a WandbLogger for notebook use with minimal configuration.
- Parameters:
- Returns:
Configured logger instance, or None if disabled watch_cfg : Watch configuration for use with maybe_watch_model, or
None if disabled
- Return type:
logger
Examples
>>> logger, watch_cfg = create_notebook_logger( ... project="my-project", ... name="experiment-1", ... tags=["notebook", "exploration"], ... ) >>> # Then pass to trainer: L.Trainer(..., logger=logger) >>> # And optionally: maybe_watch_model(logger, model, watch_cfg)
- create_wandb_logger(logging_cfg, *, experiment_name, run_name=None, job_type=None, work_dir=None, config=None)[source]#
Instantiate a WandbLogger when enabled via the Hydra logging config.
- log_metrics(logger, metrics, step=None)[source]#
Log scalar metrics when a trainer is not driving WandbLogger.
- Parameters:
logger (WandbLogger | None)
step (int | None)
- Return type:
None
- maybe_watch_model(logger, model, watch_cfg)[source]#
Attach gradient/parameter watching if requested by the config.
- Parameters:
logger (WandbLogger | None)
model (Module | None)
watch_cfg (_WatchConfig | None)
- Return type:
None