tracel-ai/burn · error
Error when saving the state: {err}
Error message
Error when saving the state: {err} What it means
Same callback-channel guard for the save path of the async checkpointer: when persisting checkpoint state completes and the completion notification cannot be delivered (receiver dropped), and no interrupter exists, the thread panics with the send error. It indicates the checkpoint consumer terminated before acknowledging the save result.
Source
Thrown at crates/burn-train/src/checkpoint/async_checkpoint.rs:46
for item in self.receiver.iter() {
match item {
Message::Restore(epoch, callback, interrupter) => {
let record = self.checkpointer.restore(epoch);
callback.send(record).unwrap_or_else(|err| {
interrupter.map_or_else(
|| {
panic!(
"Error when sending response through callback channel: {err}"
)
},
|int| int.stop(Some(&err.to_string())),
)
});
}
Message::Save(epoch, state, interrupter) => {
self.checkpointer.save(epoch, state).unwrap_or_else(|err| {
interrupter.map_or_else(
|| panic!("Error when saving the state: {err}"),
|int| int.stop(Some(&err.to_string())),
)
});
}
Message::Delete(epoch, interrupter) => {
self.checkpointer.delete(epoch).unwrap_or_else(|err| {
interrupter.map_or_else(
|| panic!("Error when deleting the state: {err}"),
|int| int.stop(Some(&err.to_string())),
)
});
}
Message::End => {
return;
}
};
}View on GitHub (pinned to d16f7ba2ed)
Solutions
- Keep the checkpointing client alive until save acknowledgments are received.
- Route shutdown through the interrupter so the worker stops instead of panicking on send failure.
- Check the training loop for early termination that orphans the checkpoint channel.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/burn-train/src/checkpoint/async_checkpoint.rs:46 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/2a1a6cb2b6c6b1d0.
Report an issue: GitHub.