pub struct BackgroundLoop { /* private fields */ }Expand description
Background learning loop (Loop B)
Implementations§
Source§impl BackgroundLoop
impl BackgroundLoop
Sourcepub fn new(
config: BackgroundLoopConfig,
reasoning_bank: Arc<RwLock<ReasoningBank>>,
ewc: Arc<RwLock<EwcPlusPlus>>,
base_lora: Arc<RwLock<BaseLoRA>>,
) -> Self
pub fn new( config: BackgroundLoopConfig, reasoning_bank: Arc<RwLock<ReasoningBank>>, ewc: Arc<RwLock<EwcPlusPlus>>, base_lora: Arc<RwLock<BaseLoRA>>, ) -> Self
Create new background loop
Sourcepub fn should_run(&self) -> bool
pub fn should_run(&self) -> bool
Check if it’s time for background cycle
Sourcepub fn run_cycle(&self, trajectories: Vec<QueryTrajectory>) -> BackgroundResult
pub fn run_cycle(&self, trajectories: Vec<QueryTrajectory>) -> BackgroundResult
Run background learning cycle
Sourcepub fn reasoning_bank(&self) -> &Arc<RwLock<ReasoningBank>>
pub fn reasoning_bank(&self) -> &Arc<RwLock<ReasoningBank>>
Get reasoning bank reference
Sourcepub fn ewc(&self) -> &Arc<RwLock<EwcPlusPlus>>
pub fn ewc(&self) -> &Arc<RwLock<EwcPlusPlus>>
Get EWC reference
Auto Trait Implementations§
impl !Freeze for BackgroundLoop
impl !RefUnwindSafe for BackgroundLoop
impl Send for BackgroundLoop
impl Sync for BackgroundLoop
impl Unpin for BackgroundLoop
impl !UnwindSafe for BackgroundLoop
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more