tracel-ai/burn · error

Can delete policy checkpoint.

Error message

Can delete policy checkpoint.

What it means

Guard in the RL checkpointer's `checkpoint`: deleting an old policy checkpoint for the epoch selected by the checkpointing strategy failed (I/O or missing file), so the loop panics rather than continue with possibly unbounded checkpoint accumulation.

Solutions

  1. Check permissions and disk state of the checkpoint directory
  2. Inspect the underlying error from the record deletion
  3. Handle stale/missing epochs gracefully if concurrent runs share the directory
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/burn-train/src/learner/rl/checkpointer.rs:39 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/59b300cbd5c080dc. Report an issue: GitHub.

Appendix: source

Thrown at crates/burn-train/src/learner/rl/checkpointer.rs:39

    RLPolicyRecord<RLC>: Checkpoint,
    RLAgentRecord<RLC>: Checkpoint,
{
    /// Create checkpoint for the training process.
    pub fn checkpoint(
        &mut self,
        policy: &RLC::PolicyState,
        learning_agent: &RLC::LearningAgent,
        epoch: usize,
        store: &EventStoreClient,
    ) {
        let actions = self.strategy.checkpointing(epoch, store);

        for action in actions {
            match action {
                CheckpointingAction::Delete(epoch) => {
                    self.policy
                        .delete(epoch)
                        .expect("Can delete policy checkpoint.");
                    self.learning_agent
                        .delete(epoch)
                        .expect("Can delete learning agent checkpoint.")
                }
                CheckpointingAction::Save => {
                    self.policy
                        .save(epoch, policy.clone().into_record())
                        .expect("Can save policy checkpoint.");
                    self.learning_agent
                        .save(epoch, learning_agent.record())
                        .expect("Can save learning agent checkpoint.");
                }
            }
        }
    }

    /// Load a training checkpoint.
    pub fn load_checkpoint(

View on GitHub (pinned to d16f7ba2ed)