Zum Inhalt

Dashboard API

Training metrics visualisation — terminal, HTML report, and callback-based collection.

Collection

rlox.dashboard.MetricsCollector

Bases: Callback

Collects time-series training metrics for visualization.

Stores per-step values for common RL training metrics and provides summary statistics at the end of training.

Parameters

None

Examples

mc = MetricsCollector() mc.on_training_start(total_timesteps=50_000) mc.on_step(step=0, episode_reward=10.0, policy_loss=0.5) True mc.summary()["total_steps"] 1

get_dataframe() -> dict[str, list[Any]]

Return metrics as a dict of lists (independent copy).

summary() -> dict[str, Any]

Return a summary dict with final values, peak reward, training time.

Display

rlox.dashboard.TerminalDashboard

Bases: Callback

Rich-based live terminal display of training progress.

Uses the rich library to render a live panel showing current training metrics. Falls back gracefully to a no-op if rich is not installed.

Parameters

update_freq : int Update the display every update_freq steps (default 100).

Reporting

rlox.dashboard.HTMLReport

Generate a standalone HTML report with embedded SVG charts.

Parameters

metrics : MetricsCollector Populated metrics collector from a training run. output_path : str Path for the output HTML file (default "training_report.html").

generate() -> None

Write a self-contained HTML report to disk.