Abstract base class for all loggers.
Subclass this to implement custom logging backends.
-
name
Name of the experiment/run.
- Type:
str
-
version
Version or run ID.
- Type:
str
-
finalize(status='success')[source]
Finalize logging (called at end of training).
- Parameters:
status (str) – Final status (‘success’, ‘failed’, ‘interrupted’).
-
log_artifact(local_path, artifact_path=None)[source]
Log an artifact (file).
- Parameters:
-
-
property log_dir: str | None
Directory for this specific run’s logs.
-
log_graph(model, input_array=None)[source]
Log model graph/architecture.
- Parameters:
-
-
abstractmethod log_hyperparams(params)[source]
Log hyperparameters.
- Parameters:
params (Dict[str, Any]) – Dictionary of hyperparameter names to values.
-
log_image(key, images, step=None)[source]
Log images.
- Parameters:
key (str) – Image key/tag.
images (Any) – Images to log (numpy array or list).
step (int | None) – Global step number.
-
abstractmethod log_metrics(metrics, step=None)[source]
Log metrics.
- Parameters:
metrics (Dict[str, float]) – Dictionary of metric names to values.
step (int | None) – Global step number.
-
log_text(key, text, step=None)[source]
Log text.
- Parameters:
key (str) – Text key/tag.
text (str) – Text to log.
step (int | None) – Global step number.
-
property name: str
Experiment name.
-
property root_dir: str | None
Root directory for logs.
-
save()[source]
Save/flush any buffered data.
-
property version: str | None
Experiment version/run ID.