tracel-ai/burn · error
Not implemented yet. Please load the record on the inner pol
Error message
Not implemented yet. Please load the record on the inner policy before creating an async policy.
What it means
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.
Source
Thrown at crates/burn-rl/src/policy/async_policy.rs:321
fn state(&self) -> Self::PolicyState {
let (sender, receiver) = mpsc::channel();
self.inference_state_sender
.send(InferenceMessage::PolicyRequest(sender))
.expect("should be able to send message to inference_server.");
receiver
.recv()
.expect("AsyncPolicy should be able to receive policy state.")
}
fn to_device(self, device: &Device) -> Self {
self.inference_state_sender
.send(InferenceMessage::ToDevice(device.clone()))
.expect("AsyncPolicy should be able to send policy state.");
self
}
fn load_record(self, _record: <Self::PolicyState as PolicyState>::Record) -> Self {
unimplemented!(
"Not implemented yet. Please load the record on the inner policy before creating an async policy."
)
}
}
#[cfg(test)]
#[allow(clippy::needless_range_loop)]
mod tests {
use std::thread::JoinHandle;
use std::time::Duration;
use crate::tests::{MockAction, MockObservation, MockPolicy};
use super::*;
#[test]
fn test_multiple_actions_before_flush() {
fn launch_thread(policy: &AsyncPolicy<MockPolicy>, handles: &mut Vec<JoinHandle<()>>) {View on GitHub (pinned to d16f7ba2ed)
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/burn-rl/src/policy/async_policy.rs:321 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/19c9953c68aad41f.
Report an issue: GitHub.