ml.loggers.wandb
Defines a Weights & Biases logging inferface.
This interface is used to log metrics and artifacts to Weights & Biases.
- class ml.loggers.wandb.WandbLoggerConfig(name: str = '???', write_every_n_seconds: float | None = None, write_train_every_n_seconds: float | None = None, write_val_every_n_seconds: float | None = None, flush_seconds: float = 10.0)[source]
Bases:
BaseLoggerConfig
- flush_seconds: float = 10.0
- class ml.loggers.wandb.WandbLogger(config: WandbLoggerConfig)[source]
Bases:
BaseLogger
[WandbLoggerConfig
]- log_scalar(key: str, value: Callable[[], int | float | Tensor], state: State, namespace: str) None [source]
Logs a scalar value.
- Parameters:
key – The key to log
value – The value to log
state – The current log state
namespace – The namespace to be logged
- log_string(key: str, value: Callable[[], str], state: State, namespace: str) None [source]
Logs a string value.
- Parameters:
key – The key to log
value – The value to log
state – The current log state
namespace – The namespace to be logged
- log_image(key: str, value: Callable[[], Tensor], state: State, namespace: str) None [source]
Logs a normalized image, with shape (C, H, W).
- Parameters:
key – The key to log
value – The value to log
state – The current log state
namespace – The namespace to be logged
- log_audio(key: str, value: Callable[[], tuple[torch.Tensor, int]], state: State, namespace: str) None [source]
Logs a normalized audio, with shape (T,).
- Parameters:
key – The key to log
value – The value to log
state – The current log state
namespace – The namespace to be logged