tracel-ai/burn · error

Can save policy checkpoint.

Error message

Can save policy checkpoint.

What it means

Guard in the RL checkpointer's `checkpoint`: saving the policy checkpoint for the current epoch failed (I/O, serialization, or missing directory), so the checkpointer panics rather than continue training without a durable policy snapshot.

Source

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

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

View on GitHub (pinned to d16f7ba2ed)

Solutions

  1. Check disk space and write permissions on the checkpoint directory
  2. Inspect the inner save error (serialization/path issues)
  3. Create the checkpoint directory before training starts
Defensive patterns

Strategy: retry

When it happens

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