Repository navigation
Done
Description
Background
APPO currently emits startup logs, warnings and errors, while training metrics go to TensorBoard and live metrics. It does not yet provide a continuously refreshed terminal training panel. Provide the same baseline training observability as FastSAC by reusing motrix_rl.console, without copying FastSAC-private panels or introducing an APPO-to-builtin dependency.
Initial scope
- Integrate TrainingPanelSession into the APPO parent-process trainer, reusing the overview, timing and system views and the plain-text fallback for non-TTY output.
- Aggregate and display update progress, consumed environment steps, FPS, elapsed time/ETA, recent raw episode return/length, and completed episode count.
- Display existing learner metrics: policy/value loss, entropy, KL, learning rate, policy standard deviation and gradient norm.
- Display queue depth, weight lag, transport types, and collector/ingest/optimize/publish timings.
- Reuse EpisodeWindow, RateTracker, TimingWindow and PanelSystemSampler where applicable; throttle system sampling to the display cadence.
- Refresh on a time-based cadence independently of logging.interval; update the panel after a checkpoint is successfully saved.
- Provide visible startup-stage messages; close Live and restore the terminal on normal completion, exceptions and Ctrl+C.
- Handle collector stdout/stderr and warnings so child-process output does not corrupt the parent-owned Live display, while preserving accessible logs and failure diagnostics.
- Update the APPO usage documentation and relevant design documentation.
Metric semantics and boundaries
- Initially calculate FPS from transitions consumed by the learner, not the total number actually sampled by the collector. On resume, calculate throughput from steps added during the current invocation only.
- Episode statistics must use raw returns without timeout-bootstrap corrections. Explicitly show unavailable values until an episode completes.
- Collector and learner execute concurrently: do not add their durations and present the result as serial per-update wall time. Do not label host enqueue/wall timings as precise GPU execution timings or add CUDA synchronization for the console.
- APPO has no replay buffer. If the shared panel buffer fields represent the rollout queue, use explicit labels and units to avoid misleading users.
- The parent process also executes the learner. Do not copy FastSAC’s multi-worker monitoring/aggregation architecture or introduce a monitoring thread in the initial implementation.
- Panel refreshes must not change the existing TensorBoard/live-metrics sampling or output semantics.
Out of scope for the initial implementation
A full FastSAC-style startup worker grid, worker-log tails, and detailed compile/capture stage reporting can follow later. If a shared startup UI becomes necessary, move genuinely generic functionality into motrix_rl rather than depending on fastsac.async_impl.panels. This issue does not change the algorithm, transport protocol or training budget.
Acceptance criteria
- Unit tests cover metric/counter mapping, no completed episodes, resume throughput baselines, checkpoint notifications and lifecycle cleanup.
- Non-TTY progress output is readable, throttled and free of redraw control sequences; logs remain available for diagnosing failures.
- Run a CPU CartPole smoke test for training and shutdown, and manually check view switching and terminal restoration after Ctrl+C in a real TTY.
- If CUDA paths are validated, record the hardware, commands and outcomes explicitly; static inspection or skipped tests do not substitute for runtime validation.
Relevant code
- motrix_rl_appo/src/motrix_rl_appo/trainer.py
- motrix_rl_appo/src/motrix_rl_appo/collector.py
- motrix_rl/src/motrix_rl/console/{panel,data,metrics}.py
- motrix_rl_builtin/src/motrix_rl_builtin/fastsac/async_impl/{stats,panels,train}.py (reference only; no reverse dependency)
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]为 APPO 训练接入共享 Live Console[/-][+]Add a shared live training console for APPO[/+]wlgys8 commentedon Dec 3, 2026
Closing as the core APPO live training console has been implemented and merged in PR #210 (0dc80cd). The implementation includes shared boot/metrics console phases, independent display cadence, learner-consumed throughput, recent raw episode statistics, learner/queue/lag/timing metrics, checkpoint notifications, worker log isolation, cleanup, and documentation.
Validation: PR #210 records CPU spawn/resume coverage; a focused local APPO metrics/trainer/shared-console regression run passed (66 passed, 2 deselected).
Remaining follow-up scope, not claimed as validated here: completed-episode count display, persistent transport-type display in the panel, and real interactive TTY view-switching/Ctrl+C terminal-restoration acceptance. PR #210 also intentionally changed canonical metric naming and episode aggregation semantics.