pub struct EnhancedAdaptiveLRController<A: Float + Send + Sync> { /* private fields */ }Expand description
Enhanced adaptive learning rate controller with multiple adaptation mechanisms
Implementations§
Source§impl<A: Float + Default + Clone + Sum + Send + Sync> EnhancedAdaptiveLRController<A>
impl<A: Float + Default + Clone + Sum + Send + Sync> EnhancedAdaptiveLRController<A>
Sourcepub fn new(config: AdaptiveLRConfig<A>) -> Result<Self>
pub fn new(config: AdaptiveLRConfig<A>) -> Result<Self>
Create a new enhanced adaptive learning rate controller
Sourcepub fn record_memory_usage_mb(&mut self, usage_mb: f64)
pub fn record_memory_usage_mb(&mut self, usage_mb: f64)
Report the memory this optimizer’s workload is currently using, so the resource signal has a real figure to work from (E4).
Sourcepub fn record_energy_sample(&mut self, joules: f64)
pub fn record_energy_sample(&mut self, joules: f64)
Report measured energy consumption for the most recent step.
Sourcepub fn record_throughput(&mut self, samples_per_second: A)
pub fn record_throughput(&mut self, samples_per_second: A)
Report the observed sample throughput so the resource signal can compare it against the configured requirement.
Sourcepub fn add_source_task(&mut self, task: TaskData<A>)
pub fn add_source_task(&mut self, task: TaskData<A>)
Register a previously solved task so the meta-optimizer can transfer its learning-rate schedule (it contributes nothing while none are known).
Sourcepub fn update_learning_rate(
&mut self,
gradients: &Array1<A>,
loss: A,
metrics: &HashMap<String, A>,
step: usize,
) -> Result<A>
pub fn update_learning_rate( &mut self, gradients: &Array1<A>, loss: A, metrics: &HashMap<String, A>, step: usize, ) -> Result<A>
Update learning rate based on multiple adaptation signals
Sourcepub fn previous_lr(&self) -> Option<A>
pub fn previous_lr(&self) -> Option<A>
Learning rate before the most recent adaptation, if there was one.
Sourcepub fn last_decision(&self) -> Option<&AdaptationDecision<A>>
pub fn last_decision(&self) -> Option<&AdaptationDecision<A>>
The most recent adaptation decision, including its rationale.
Sourcepub fn voting_history(&self) -> &VecDeque<SignalVote<A>>
pub fn voting_history(&self) -> &VecDeque<SignalVote<A>>
Recorded signal votes, newest last.
Sourcepub fn get_current_lr(&self) -> A
pub fn get_current_lr(&self) -> A
Get current learning rate
Sourcepub fn get_adaptation_statistics(&self) -> AdaptationStatistics<A>
pub fn get_adaptation_statistics(&self) -> AdaptationStatistics<A>
Get adaptation statistics
Sourcepub fn evaluate_adaptation_effectiveness(&mut self, performance_improvement: A)
pub fn evaluate_adaptation_effectiveness(&mut self, performance_improvement: A)
Evaluate adaptation effectiveness retrospectively
Sourcepub fn meta_arm_rewards(&self) -> &HashMap<usize, A>
pub fn meta_arm_rewards(&self) -> &HashMap<usize, A>
Measured mean reward per meta-learning arm.
Sourcepub fn meta_arm_counts(&self) -> &HashMap<usize, usize>
pub fn meta_arm_counts(&self) -> &HashMap<usize, usize>
Times each meta-learning arm has been played.
Sourcepub fn signal_reliability(&self) -> &HashMap<AdaptationSignalType, A>
pub fn signal_reliability(&self) -> &HashMap<AdaptationSignalType, A>
Measured reliability of each adaptation signal.
Trait Implementations§
Source§impl<A: Clone + Float + Send + Sync> Clone for EnhancedAdaptiveLRController<A>
impl<A: Clone + Float + Send + Sync> Clone for EnhancedAdaptiveLRController<A>
Source§fn clone(&self) -> EnhancedAdaptiveLRController<A>
fn clone(&self) -> EnhancedAdaptiveLRController<A>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<A> Freeze for EnhancedAdaptiveLRController<A>where
A: Freeze,
impl<A> RefUnwindSafe for EnhancedAdaptiveLRController<A>where
A: RefUnwindSafe,
impl<A> Send for EnhancedAdaptiveLRController<A>
impl<A> Sync for EnhancedAdaptiveLRController<A>
impl<A> Unpin for EnhancedAdaptiveLRController<A>where
A: Unpin,
impl<A> UnsafeUnpin for EnhancedAdaptiveLRController<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for EnhancedAdaptiveLRController<A>where
A: UnwindSafe + RefUnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.