tracel-ai/burn · error

Can load learning agent checkpoint.

Error message

Can load learning agent checkpoint.

What it means

Guard in `RLCheckpointer::load_checkpoint`: restoring the learning agent record for the requested epoch failed (missing or unreadable checkpoint), so loading panics rather than returning an agent without its state.

Solutions

  1. Confirm the agent checkpoint for the epoch was saved (save and load use the same strategy)
  2. Check disk/permissions on the checkpoint directory
  3. Use a valid epoch number present in the checkpoint storage
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

        }
    }

    /// 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
            .learning_agent
            .restore(epoch)
            .expect("Can load learning agent checkpoint.");
        let mut learning_agent = learning_agent.load_record(record);
        learning_agent.update_policy(policy);

        learning_agent
    }
}

View on GitHub (pinned to d16f7ba2ed)