tracel-ai/burn · error

Can save learning agent checkpoint.

Error message

Can save learning agent checkpoint.

What it means

Guard in the RL checkpointer's `checkpoint`: saving the learning agent checkpoint for the current epoch failed, so the checkpointer panics because losing agent state breaks resume-from-checkpoint guarantees.

Source

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

        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(
        &self,
        learning_agent: RLC::LearningAgent,
        epoch: usize,
    ) -> RLC::LearningAgent {
        let record = self
            .policy
            .restore(epoch)
            .expect("Can load model checkpoint.");
        let policy = learning_agent.policy().load_record(record);

        let record = self

View on GitHub (pinned to d16f7ba2ed)

Solutions

  1. Verify the checkpoint path is writable and has free space
  2. Inspect the wrapped save error for the root cause
  3. Ensure policy and agent records serialize with the enabled features
Defensive patterns

Strategy: retry

When it happens

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