{"record":{"id":"19c9953c68aad41f","repo":"tracel-ai/burn","slug":"not-implemented-yet-please-load-the-record-on-the","errorCode":null,"errorMessage":"Not implemented yet. Please load the record on the inner policy before creating an async policy.","messagePattern":"Not implemented yet\\. Please load the record on the inner policy before creating an async policy\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-rl/src/policy/async_policy.rs","lineNumber":321,"sourceCode":"    fn state(&self) -> Self::PolicyState {\n        let (sender, receiver) = mpsc::channel();\n        self.inference_state_sender\n            .send(InferenceMessage::PolicyRequest(sender))\n            .expect(\"should be able to send message to inference_server.\");\n        receiver\n            .recv()\n            .expect(\"AsyncPolicy should be able to receive policy state.\")\n    }\n\n    fn to_device(self, device: &Device) -> Self {\n        self.inference_state_sender\n            .send(InferenceMessage::ToDevice(device.clone()))\n            .expect(\"AsyncPolicy should be able to send policy state.\");\n        self\n    }\n\n    fn load_record(self, _record: <Self::PolicyState as PolicyState>::Record) -> Self {\n        unimplemented!(\n            \"Not implemented yet. Please load the record on the inner policy before creating an async policy.\"\n        )\n    }\n}\n\n#[cfg(test)]\n#[allow(clippy::needless_range_loop)]\nmod tests {\n    use std::thread::JoinHandle;\n    use std::time::Duration;\n\n    use crate::tests::{MockAction, MockObservation, MockPolicy};\n\n    use super::*;\n\n    #[test]\n    fn test_multiple_actions_before_flush() {\n        fn launch_thread(policy: &AsyncPolicy<MockPolicy>, handles: &mut Vec<JoinHandle<()>>) {","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-rl/src/policy/async_policy.rs#L303-L339","documentation":"Unimplemented guard in `AsyncPolicy::load_record`: the async policy wrapper delegates weight loading to the inner inference server, but records must be loaded on the inner policy before wrapping it in an async policy; calling load_record directly is unsupported.","triggerScenarios":"Thrown at crates/burn-rl/src/policy/async_policy.rs:321 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call `load_record` on the inner policy first, then construct the AsyncPolicy from it","Re-create the AsyncPolicy with the updated inner policy instead of mutating it","Add a load-record message to the inference channel if async loading is required"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}