Observatory Pro -- v2.5.8¶
Available since v1.3.0, current in v2.5.8 -- Six major upgrades that turn the Training Observatory from a passive log dump into an active diagnostic engine.
What's New¶
| Feature | Problem Solved | Impact |
|---|---|---|
| Adaptive Logging | EXPERT logs everything → 77k entries | 80-90% log reduction |
| Health Warnings | "All clear" despite 58% dead neurons | Catches problems automatically |
| Epoch Summaries | No statistical view per epoch | Mean/std/min/max per metric |
| Tiered Storage | One flat JSON file | 3 focused files: basic/health/debug |
| Visual Dashboard | Raw JSON only | Interactive HTML charts |
| Training Fingerprint | Can't reproduce runs | Full environment capture |
1. Smart / Adaptive Logging¶
The AdaptiveLogger wraps a standard TrainingLogger and only escalates to EXPERT detail when something looks suspicious. In normal operation it stays at BASIC level, reducing log size by 80-90%.
Anomaly Triggers¶
| Trigger | Default Threshold | What Happens |
|---|---|---|
| Dead neurons (zeros %) | 50% | Escalate + emit warning |
| Gradient spike | 5× rolling average | Escalate + emit warning |
| Vanishing gradient | L2 < 1e-7 | Escalate + emit danger |
| Exploding gradient | L2 > 100 | Escalate + emit danger |
| Loss spike | +50% between batches | Escalate + emit warning |
| NaN / Inf anywhere | Any | Escalate + emit critical |
| Weight stagnation | Δ < 1e-6 for 5 batches | Escalate + emit warning |
| Activation saturation | > 40% | Escalate + emit warning |
Usage¶
from neurogebra.logging.adaptive import AdaptiveLogger, AnomalyConfig
from neurogebra.logging.logger import TrainingLogger, LogLevel
# Create a base logger at EXPERT level
base_logger = TrainingLogger(level=LogLevel.EXPERT)
# Wrap it in the adaptive logger
adaptive = AdaptiveLogger(base_logger, config=AnomalyConfig(
zeros_pct_threshold=50.0, # trigger on >50% dead neurons
gradient_spike_factor=5.0, # trigger on 5× gradient spike
escalation_cooldown=10, # stay escalated for 10 events
))
# Use adaptive as a drop-in replacement
adaptive.on_train_start(total_epochs=20)
adaptive.on_epoch_start(0)
# This won't produce EXPERT events (normal data):
adaptive.on_layer_forward(0, "dense_0", output_data=normal_activations)
# This WILL produce EXPERT events (all zeros → dead neurons):
adaptive.on_layer_forward(0, "dense_0", output_data=dead_activations)
# Check what anomalies were detected
print(adaptive.get_anomaly_summary())
Customising Thresholds¶
config = AnomalyConfig(
zeros_pct_threshold=30.0, # more sensitive dead neuron detection
gradient_spike_factor=3.0, # more sensitive spike detection
loss_spike_pct=30.0, # trigger on 30% loss increase
weight_stagnation_window=10, # look at 10 consecutive updates
escalation_cooldown=20, # stay in detail mode longer
)
adaptive = AdaptiveLogger(base_logger, config=config)
2. Automated Health Warnings¶
The AutoHealthWarnings engine runs threshold-based rules on every batch and epoch, emitting structured HealthWarning objects with human-readable diagnoses and actionable advice.
Rules¶
| Rule | Condition | Severity | Message |
|---|---|---|---|
dead_relu |
zeros_pct > 50% | warning | "Possible dying ReLU in dense_0" |
gradient_spike |
norm > 5× rolling avg | warning | "Possible exploding gradient" |
vanishing_gradient |
norm < 1e-7 | danger | "Vanishing gradient in dense_0" |
exploding_gradient |
norm > 100 | danger | "Exploding gradient in dense_0" |
overfitting |
val_loss / train_loss > 1.3 | warning | "Possible overfitting" |
loss_stagnation |
Δloss < 1e-4 for N epochs | warning | "Loss stagnant" |
weight_stagnation |
Δweight < 1e-6 for N batches | warning | "Optimizer may have stagnated" |
nan_inf_loss |
NaN or Inf in loss | critical | "NaN/Inf detected in loss!" |
loss_divergence |
loss ×3 over N batches | danger | "Loss diverging" |
activation_saturation |
saturation > 40% | warning | "Activations saturated" |
Usage¶
from neurogebra.logging.health_warnings import AutoHealthWarnings, WarningConfig
warnings_engine = AutoHealthWarnings(config=WarningConfig(
dead_relu_zeros_pct=50.0,
overfit_patience=3,
overfit_ratio=1.3,
))
# Call during training
for epoch in range(epochs):
for batch_idx, (X_batch, y_batch) in enumerate(batches):
# ... forward/backward ...
# Check batch-level health
batch_alerts = warnings_engine.check_batch(
epoch=epoch,
batch=batch_idx,
loss=current_loss,
gradient_norms={"dense_0": 0.05, "dense_1": 0.03},
activation_stats={"dense_0": {"zeros_pct": 62.0, "activation_type": "relu"}},
)
for alert in batch_alerts:
print(f" ⚠️ [{alert.severity}] {alert.message}")
# Check epoch-level health
epoch_alerts = warnings_engine.check_epoch(
epoch=epoch,
train_loss=train_loss,
val_loss=val_loss,
)
# Get summary
print(warnings_engine.get_summary())
Each HealthWarning contains:
HealthWarning(
rule_name="dead_relu",
severity="warning",
message="Possible dying ReLU in 'dense_0' (62.0% zeros)",
diagnosis="Neurons producing zero outputs will receive zero gradients and never recover.",
recommendations=[
"Use LeakyReLU(negative_slope=0.01) instead of ReLU",
"Lower the learning rate",
"Use He initialisation",
],
layer_name="dense_0",
epoch=5, batch=10,
)
3. Log Summarization Per Epoch¶
The EpochSummarizer aggregates batch-level statistics and produces mean, std, min, max across all batches in each epoch.
Usage¶
from neurogebra.logging.epoch_summary import EpochSummarizer
summarizer = EpochSummarizer()
for epoch in range(epochs):
for batch_idx in range(num_batches):
summarizer.record_batch(
epoch=epoch,
metrics={"loss": batch_loss, "accuracy": batch_acc},
gradient_norms={"dense_0": grad_norm_0, "dense_1": grad_norm_1},
)
summary = summarizer.finalize_epoch(epoch)
print(summary.format_text())
Output¶
══ Epoch 5 Summary (32 batches) ══
Metrics:
loss mean=0.342100 std=0.015200 min=0.310000 max=0.380000
accuracy mean=0.891200 std=0.008500 min=0.870000 max=0.910000
Gradient Norms:
dense_0 mean=5.23e-02 std=1.12e-02 min=3.10e-02 max=8.40e-02
dense_1 mean=2.10e-02 std=5.30e-03 min=1.20e-02 max=3.50e-02
Programmatic Access¶
# Get structured data
d = summary.to_dict()
print(d["metrics"]["loss"]["mean"]) # 0.3421
print(d["metrics"]["loss"]["std"]) # 0.0152
# Get all epoch summaries
all_summaries = summarizer.get_all_summaries()
4. Tiered Storage / Streaming¶
Instead of one massive JSON file, TieredStorage writes three separate NDJSON (newline-delimited JSON) files:
| File | Contains | When Written |
|---|---|---|
basic.log |
Epoch metrics, train start/end | Every epoch |
health.log |
Warnings, anomalies, health checks | On each alert (immediate) |
debug.log |
Full EXPERT-level detail | Only when needed |
Usage¶
from neurogebra.logging.tiered_storage import TieredStorage
from neurogebra.logging.logger import TrainingLogger, LogLevel
storage = TieredStorage(
base_dir="./training_logs",
write_debug=True, # set False in production to save I/O
buffer_size=50, # flush every 50 events
)
logger = TrainingLogger(level=LogLevel.EXPERT)
logger.add_backend(storage)
# ... train as normal ...
storage.flush() # final flush
storage.close() # cleanup
# Check what was written
print(storage.summary())
# {'basic': {'events': 42, 'size_bytes': 8192},
# 'health': {'events': 3, 'size_bytes': 1024},
# 'debug': {'events': 12500, 'size_bytes': 2097152},
# 'total_events': 12545}
Reading Logs¶
# Easy to grep through specific tiers
basic_events = storage.read_basic()
health_events = storage.read_health()
# Or from command line:
# grep "overfitting" training_logs/health.log
# grep "dense_0" training_logs/debug.log
NDJSON Format¶
Each line is a self-contained JSON object — easy to stream, grep, and parse:
{"event_type":"epoch_end","level":"BASIC","timestamp":1740000000.0,"epoch":0,"severity":"info","message":"Epoch 1 done","data":{"metrics":{"loss":0.85,"accuracy":0.72}}}
{"event_type":"epoch_end","level":"BASIC","timestamp":1740000001.5,"epoch":1,"severity":"info","message":"Epoch 2 done","data":{"metrics":{"loss":0.63,"accuracy":0.81}}}
5. Visual Dashboard¶
The DashboardExporter generates a self-contained interactive HTML dashboard with Chart.js charts.
Charts Included¶
- 📉 Loss curves (train + validation)
- 📈 Accuracy curves (train + validation)
- ⏱️ Epoch timing bar chart
- 📊 Raw batch-level loss curve
- 🩺 Health diagnostics timeline
Usage¶
from neurogebra.logging.dashboard import DashboardExporter
from neurogebra.logging.logger import TrainingLogger, LogLevel
dashboard = DashboardExporter(path="training_logs/dashboard.html")
logger = TrainingLogger(level=LogLevel.EXPERT)
logger.add_backend(dashboard)
# ... train as normal ...
dashboard.save() # generates the interactive HTML file
# Open training_logs/dashboard.html in any browser
TensorBoard Integration¶
from neurogebra.logging.dashboard import TensorBoardBridge
tb = TensorBoardBridge(log_dir="./tb_logs")
if tb.available:
logger.add_backend(tb)
# ... after training ...
tb.close()
# Then: tensorboard --logdir=./tb_logs
Weights & Biases Integration¶
from neurogebra.logging.dashboard import WandBBridge
wandb_bridge = WandBBridge(
project="my_experiment",
run_name="experiment_001",
config={"lr": 0.01, "epochs": 50},
)
if wandb_bridge.available:
logger.add_backend(wandb_bridge)
# ... after training ...
wandb_bridge.close()
6. Training Fingerprint / Reproducibility Block¶
The TrainingFingerprint captures everything needed to reproduce a training run:
What It Captures¶
| Category | Fields |
|---|---|
| Seeds | random_seed, numpy_seed |
| Dataset | SHA-256 hash, shape, dtype, sample count |
| Versions | Neurogebra, Python, NumPy, SciPy, SymPy, Rich |
| Hardware | CPU model, core count, RAM, GPU (if available) |
| OS | System, release, machine architecture |
| Model | Architecture hash, full model info dict |
| Hyperparameters | All training hyperparameters |
| Git | Commit hash, branch name, dirty status |
Usage¶
from neurogebra.logging.fingerprint import TrainingFingerprint
import numpy as np
fingerprint = TrainingFingerprint.capture(
model_info={"name": "my_model", "layers": [...]},
hyperparameters={"lr": 0.01, "batch_size": 32, "epochs": 50},
dataset=X_train, # auto-hashed
random_seed=42,
)
# Pretty-print
print(fingerprint.format_text())
Output¶
╔══ Training Fingerprint ══╗
Run ID: a1b2c3d4e5f6
Timestamp: 2026-02-27 14:30:00
Seed: 42
Dataset Hash: 8f14e45fceea167a
Dataset: (10000, 784) (float64)
Neurogebra: 1.3.0
Python: 3.11.5
NumPy: 1.26.0
CPU: AMD64 Family (8 cores)
RAM: 16.0 GB
GPU: NVIDIA GeForce RTX 3060
OS: Windows 10
Git: main@a1b2c3d4 (dirty)
Model Hash: f47ac10b58cc
Hyperparams: {'lr': 0.01, 'batch_size': 32, 'epochs': 50}
╚═════════════════════════╝
Serialisation¶
# Save to JSON
import json
with open("fingerprint.json", "w") as f:
json.dump(fingerprint.to_dict(), f, indent=2)
# Load back
with open("fingerprint.json") as f:
fp2 = TrainingFingerprint.from_dict(json.load(f))
Full Integration Example¶
Using all v1.3.0 features together:
from neurogebra.builders.model_builder import ModelBuilder
from neurogebra.logging.adaptive import AdaptiveLogger, AnomalyConfig
from neurogebra.logging.health_warnings import AutoHealthWarnings
from neurogebra.logging.epoch_summary import EpochSummarizer
from neurogebra.logging.tiered_storage import TieredStorage
from neurogebra.logging.dashboard import DashboardExporter
from neurogebra.logging.fingerprint import TrainingFingerprint
from neurogebra.logging.logger import TrainingLogger, LogLevel
import numpy as np
# 1. Build model
builder = ModelBuilder()
model = builder.Sequential([
builder.Dense(64, activation="relu"),
builder.Dense(32, activation="tanh"),
builder.Dense(1, activation="sigmoid"),
], name="my_model")
# 2. Create logging pipeline
base_logger = TrainingLogger(level=LogLevel.EXPERT)
adaptive = AdaptiveLogger(base_logger) # Smart filtering
storage = TieredStorage(base_dir="./logs") # Tiered files
dashboard = DashboardExporter(path="./logs/dash.html") # Visual dashboard
base_logger.add_backend(storage)
base_logger.add_backend(dashboard)
warnings = AutoHealthWarnings() # Auto health rules
summarizer = EpochSummarizer() # Epoch aggregation
# 3. Capture fingerprint
fp = TrainingFingerprint.capture(
model_info={"name": "my_model", "layers": 3},
hyperparameters={"lr": 0.01, "batch_size": 32, "epochs": 20},
dataset=X_train,
random_seed=42,
)
print(fp.format_text())
# 4. Train with full diagnostics
adaptive.on_train_start(total_epochs=20, model_info=fp.model_info)
for epoch in range(20):
adaptive.on_epoch_start(epoch)
for batch in range(num_batches):
# ... training step ...
summarizer.record_batch(epoch=epoch, metrics={"loss": loss})
warnings.check_batch(loss=loss, epoch=epoch, batch=batch)
summary = summarizer.finalize_epoch(epoch)
print(summary.format_text())
warnings.check_epoch(epoch=epoch, train_loss=train_loss, val_loss=val_loss)
adaptive.on_epoch_end(epoch, metrics={"loss": train_loss})
adaptive.on_train_end()
# 5. Save everything
storage.close()
dashboard.save()
print(f"Anomalies detected: {adaptive.get_anomaly_summary()['total_anomalies']}")
print(f"Health warnings: {warnings.get_summary()['total_warnings']}")
API Reference¶
AdaptiveLogger¶
neurogebra.logging.adaptive.AdaptiveLogger
¶
Wraps a :class:TrainingLogger and filters events adaptively.
In normal mode only BASIC-level events are emitted.
When an anomaly is detected the logger temporarily escalates to EXPERT
for escalation_cooldown events, so the user gets the full picture
around the anomaly without drowning in noise the rest of the time.
The underlying TrainingLogger must be created with
level=LogLevel.EXPERT (or higher) so it can emit the detailed
events when the adaptive logger un-mutes them.
Source code in neurogebra/logging/adaptive.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | |
Attributes¶
anomalies
property
¶
Return all detected anomalies so far.
Functions¶
on_layer_forward(layer_index, layer_name, **kwargs)
¶
Only emit EXPERT-level layer_forward when escalated or anomalous.
Source code in neurogebra/logging/adaptive.py
get_anomaly_summary()
¶
Return a structured summary of all detected anomalies.
Source code in neurogebra/logging/adaptive.py
reset()
¶
Clear all anomaly state and go back to BASIC mode.
Source code in neurogebra/logging/adaptive.py
AnomalyConfig¶
neurogebra.logging.adaptive.AnomalyConfig
dataclass
¶
Thresholds that trigger escalation from BASIC → EXPERT logging.
Source code in neurogebra/logging/adaptive.py
AutoHealthWarnings¶
neurogebra.logging.health_warnings.AutoHealthWarnings
¶
Stateful warning engine that tracks training metrics over time and fires threshold-based rules automatically.
Attach to a training loop and call :meth:check_batch /
:meth:check_epoch each iteration. Accumulated warnings are
accessible via :attr:warnings.
Source code in neurogebra/logging/health_warnings.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 | |
Functions¶
check_batch(*, epoch=None, batch=None, loss=None, gradient_norms=None, weight_stats=None, activation_stats=None, weight_deltas=None)
¶
Run all batch-level rules and return new warnings.
Source code in neurogebra/logging/health_warnings.py
check_epoch(*, epoch, train_loss=None, val_loss=None, train_acc=None, val_acc=None, gradient_norms=None, weight_stats=None, activation_stats=None)
¶
Run all epoch-level rules and return new warnings.
Source code in neurogebra/logging/health_warnings.py
get_summary()
¶
Return a structured summary of all warnings fired.
Source code in neurogebra/logging/health_warnings.py
reset()
¶
Clear all state.
Source code in neurogebra/logging/health_warnings.py
WarningConfig¶
neurogebra.logging.health_warnings.WarningConfig
dataclass
¶
Configurable thresholds for the automated health warning system.
Source code in neurogebra/logging/health_warnings.py
EpochSummarizer¶
neurogebra.logging.epoch_summary.EpochSummarizer
¶
Accumulates batch-level data and produces per-epoch statistical summaries.
Call :meth:record_batch for every batch, then :meth:finalize_epoch
at the end of the epoch to get an :class:EpochSummary.
Source code in neurogebra/logging/epoch_summary.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | |
Functions¶
record_batch(epoch, *, metrics=None, gradient_norms=None, weight_stats=None, activation_stats=None)
¶
Buffer one batch of data for the given epoch.
Source code in neurogebra/logging/epoch_summary.py
finalize_epoch(epoch)
¶
Compute and return the statistical summary for epoch.
Automatically clears batch buffers for that epoch.
Source code in neurogebra/logging/epoch_summary.py
get_all_summaries()
¶
reset()
¶
Clear all state.
Source code in neurogebra/logging/epoch_summary.py
TieredStorage¶
neurogebra.logging.tiered_storage.TieredStorage
¶
Backend for :class:TrainingLogger that writes events into three
separate NDJSON files based on their tier.
Attributes:
| Name | Type | Description |
|---|---|---|
basic_path |
Path to |
|
health_path |
Path to |
|
debug_path |
Path to |
Source code in neurogebra/logging/tiered_storage.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |
Functions¶
__init__(base_dir='./training_logs', basic_filename='basic.log', health_filename='health.log', debug_filename='debug.log', write_debug=True, buffer_size=50)
¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_dir
|
str
|
Directory for log files. |
'./training_logs'
|
basic_filename
|
str
|
Name of the epoch-metrics log file. |
'basic.log'
|
health_filename
|
str
|
Name of the health/warnings log file. |
'health.log'
|
debug_filename
|
str
|
Name of the debug-level log file. |
'debug.log'
|
write_debug
|
bool
|
Whether to write debug-tier events at all.
Set to |
True
|
buffer_size
|
int
|
Number of events to buffer before flushing to disk. |
50
|
Source code in neurogebra/logging/tiered_storage.py
handle_event(event)
¶
Classify and route the event to the appropriate tier.
Source code in neurogebra/logging/tiered_storage.py
flush()
¶
close()
¶
read_basic()
¶
read_health()
¶
read_debug()
¶
summary()
¶
Return file-size and event-count statistics.
Source code in neurogebra/logging/tiered_storage.py
DashboardExporter¶
neurogebra.logging.dashboard.DashboardExporter
¶
Advanced HTML dashboard backend.
Collects metrics during training and generates a self-contained interactive HTML file with Chart.js visualisations.
Source code in neurogebra/logging/dashboard.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
Functions¶
save()
¶
Generate and save the HTML dashboard. Returns the file path.
Source code in neurogebra/logging/dashboard.py
TensorBoardBridge¶
neurogebra.logging.dashboard.TensorBoardBridge
¶
Write Training Observatory events to TensorBoard.
Requires tensorboard to be installed
(pip install neurogebra[logging]).
Source code in neurogebra/logging/dashboard.py
WandBBridge¶
neurogebra.logging.dashboard.WandBBridge
¶
Log Training Observatory events to Weights & Biases.
Requires wandb to be installed (pip install neurogebra[logging]).
Source code in neurogebra/logging/dashboard.py
TrainingFingerprint¶
neurogebra.logging.fingerprint.TrainingFingerprint
dataclass
¶
Immutable reproducibility block for a training run.
Source code in neurogebra/logging/fingerprint.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |
Functions¶
capture(*, model_info=None, hyperparameters=None, dataset=None, random_seed=None)
classmethod
¶
Capture the current environment and return a fingerprint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_info
|
Optional[Dict[str, Any]]
|
Dict describing the model architecture. |
None
|
hyperparameters
|
Optional[Dict[str, Any]]
|
Training hyperparameters dict. |
None
|
dataset
|
Optional[Union[ndarray, str]]
|
Either a numpy array (will be hashed) or a pre-computed hash string. |
None
|
random_seed
|
Optional[int]
|
The seed used for reproducibility. |
None
|
Source code in neurogebra/logging/fingerprint.py
to_dict()
¶
Return a JSON-serialisable dict.
Source code in neurogebra/logging/fingerprint.py
from_dict(d)
classmethod
¶
Reconstruct from a dict (e.g. loaded from JSON).
Source code in neurogebra/logging/fingerprint.py
format_text()
¶
Human-readable fingerprint summary.