Weights & Biases Logging
- gene_calling_benchmark.log_benchmark_scalars(results, step=None, method_prefix=None)[source]
Log scalar benchmark metrics to an active W&B run.
Designed for online evaluation during training: call this after each evaluation batch with a lightweight subset of metrics.
- Parameters:
- Returns:
The flat dict that was logged, for inspection or further use.
- Return type:
- gene_calling_benchmark.log_benchmark_all_scalars(results, step=None, method_prefix=None)[source]
Log every numeric scalar in the benchmark result to an active W&B run.
Unlike
log_benchmark_scalars()(which logs a curated high-signal subset), this function flattens the entire result dict recursively. Suitable for final evaluation runs or post-training analysis where logging cost is not a concern.- Parameters:
- Returns:
The flat dict that was logged.
- Return type:
- gene_calling_benchmark.log_benchmark_media(results, label_config, step=None, method_prefix=None)[source]
Log all diagnostic plots to W&B as stepwise media history.
Renders every figure produced by the benchmark plotting layer and logs them all as W&B Image panels. A focused subset of high-value figures (listed in
_VIDEO_BUFFER_FIGURE_KEYS) is also buffered for later animation vialog_benchmark_media_videos().- Parameters:
results (
dict) – Aggregated benchmark result dict frombenchmark_from_arrays(). A pipeline-style wrapper{"aggregated": ..., "global": ...}is also accepted.label_config (
LabelConfig) – Label semantics for plot labelling.step (
int|None) – Training step or epoch number for W&B media history.method_prefix (
str|None) – Optional namespace prefix such as"val".
- Returns:
The logged W&B media payload (keys are W&B panel paths).
- Return type:
- gene_calling_benchmark.log_benchmark_media_videos()[source]
Log the active run’s buffered media histories as W&B videos and drop them.
Only the current run’s frames are flushed, so in a sweep each run animates its own history; other runs’ buffers (if any share the process) are left untouched for those runs to flush.
- gene_calling_benchmark.clear_benchmark_media_video_buffer()[source]
Drop all buffered media frames (every run) without logging them.
- Return type:
- gene_calling_benchmark.init_wandb_with_presets(project, run_name, config=None, **wandb_init_kwargs)[source]
Initialise a W&B run with pre-configured metric groupings.
Calls
wandb.init()and thenwandb.define_metric()to set up dashboard sections grouped by metric family. This ensures that every new run gets an organised dashboard out of the box.- Parameters:
- Returns:
The initialised run object.
- Return type: