Render Tabs¶
All rendering widgets: Fast Lane live views, Slow Lane
telemetry streams, and multi-operator evaluation: are hosted inside
RenderTabs, the central QTabWidget at the heart of the MOSAIC UI.
%%{init: {"flowchart": {"curve": "linear"}} }%%
graph TB
RT["RenderTabs<br/>(QTabWidget)"]
subgraph Static["Built-in Tabs (created at startup)"]
GRID["Grid Tab<br/>(GridRendererStrategy)"]
RAW["Raw Tab<br/>(text output)"]
VIDEO["Video Tab<br/>(RgbRendererStrategy)"]
REPLAY["Human Replay Tab"]
MULTI["Multi-Operator Tab<br/>(MultiOperatorRenderView)"]
end
subgraph Dynamic["Dynamic Tabs (created per-run)"]
FLT["FastLaneTab<br/>(Qt Quick · ~60 Hz)"]
LTT["LiveTelemetryTab<br/>(slow lane · ~10 FPS)"]
end
RT --> GRID & RAW & VIDEO & REPLAY & MULTI
RT --> FLT & LTT
style Static fill:#e8f5e9,stroke:#2e8b57,color:#333
style Dynamic fill:#e3f2fd,stroke:#1565c0,color:#333
RenderTabs¶
RenderTabs (gym_gui/ui/widgets/render_tabs.py) is a QTabWidget
that owns all rendering surfaces.
RenderTabs(
parent: QWidget | None = None,
*,
telemetry_service: TelemetryService | None = None,
run_manager: TrainingRunManager | None = None,
)
Built-in tabs are created at startup:
Tab |
Purpose |
|---|---|
Grid |
Hosts Rendering Strategies |
Raw |
Plain-text environment output (ASCII renders, debug info). |
Video |
Hosts |
Human Replay |
Episode review for previously recorded human sessions. |
Multi-Operator |
Side-by-side agent comparison via |
Dynamic tabs are created on demand by worker presenters:
add_dynamic_tab(run_id, name, widget): adds or focuses an agent-specific tab (e.g.,CleanRL-Live-agent_0).Tabs are named by the presenter using the pattern
{WorkerName}-Live-{agent_id}.
Signals forwarded from Rendering Strategies board-game renderers:
chess_move_made(str, str)connect_four_column_clicked(int)go_intersection_clicked(int, int)/go_pass_requested()sudoku_cell_selected(int, int)/sudoku_digit_entered(int, int, int)/sudoku_cell_cleared(int, int)checkers_cell_clicked(int, int)human_action_submitted(str, int): operator_id, action_indexboard_game_move_made(str, str, str): operator_id, from_sq, to_sqchess_move_button_clicked(str, str): operator_id, uci_move
Worker Presenters¶
Worker presenters (gym_gui/ui/presenters/workers/) are responsible for
creating the correct tab type when a training run starts:
Presenter |
Tab created |
|---|---|
|
|
|
|
|
|
|
|
|
|
The WorkerPresenterRegistry (registry.py) maps worker IDs to presenter
classes so MainWindow can instantiate the correct presenter automatically.
See Also¶
Training Views: the individual view widgets (
FastLaneTab,LiveTelemetryTab,OperatorRenderContainer,MultiOperatorRenderView) that are placed insideRenderTabs.Fast Lane: shared-memory ring buffer and
FastLaneConsumer.Slow Lane:
LiveTelemetryControllerandRenderingSpeedRegulator.Rendering Strategies:
RendererStrategyprotocol andRendererRegistry.Operators: the operator system that populates
MultiOperatorRenderView.Log Constants:
LOG1001–LOG1015for operator UI and render container events.