tracel-ai/burn · error
Killing training from user input.
Error message
Killing training from user input.
What it means
Deliberate shutdown panic in the TUI renderer's `send_event`: a kill was requested (via the TUI kill signal channel or the global USER_KILL_REQUESTED flag), so the renderer panics to tear down the rendering thread and stop training from user input.
Source
Thrown at crates/burn-train/src/renderer/tui/renderer.rs:135
let init = Progress::new(0, 0, None);
Self {
sender,
interrupter,
handle_join: Some(handle_join),
kill_signal: Arc::new(Mutex::new(kill_signal_receiver)),
current_split: TuiSplit::Train,
training_progress: ProgressSnapshot::new(init.clone(), init.clone()),
eval_progress: ProgressSnapshot::new(init.clone(), init),
}
}
fn send_event(&self, event: TuiRendererEvent) {
if self.kill_signal.lock().unwrap().try_recv().is_ok()
|| USER_KILL_REQUESTED.load(Ordering::Relaxed)
{
USER_KILL_REQUESTED.store(true, Ordering::Relaxed);
panic!("Killing training from user input.");
}
if let Err(e) = self.sender.send(event) {
// Ignore send errors if we are already in the middle of killing
if !USER_KILL_REQUESTED.load(Ordering::Relaxed) {
log::warn!("Failed to send TUI event: {e}");
}
}
}
/// Set the renderer to persistent mode.
pub fn persistent(self) -> Self {
self.send_event(TuiRendererEvent::Persistent);
self
}
}
struct TuiMetricsRenderer {View on GitHub (pinned to d16f7ba2ed)
Solutions
- This is an intentional user-initiated termination; no fix is needed
- Catch the unwind in the training harness if you need cleanup before exit
- Use the interrupter/graceful-stop API instead of the kill signal when a soft stop is desired
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/burn-train/src/renderer/tui/renderer.rs:135 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tracel-ai/burn@d16f7ba2ed (2026-09-05).
Data as JSON: /api/errors/27f309ba2a51804c.
Report an issue: GitHub.