pub struct MedianPruner {
pub n_warmup_steps: usize,
pub min_trials: usize,
}Expand description
Prune if current value is below the median of completed trials at the same step.
Fields§
§n_warmup_steps: usizeDon’t prune before this many steps.
min_trials: usizeMinimum completed trials needed before pruning starts.
Implementations§
Source§impl MedianPruner
impl MedianPruner
Trait Implementations§
Source§impl Pruner for MedianPruner
impl Pruner for MedianPruner
Source§fn should_prune(
&self,
metric_name: &str,
current_value: f64,
step: usize,
history: &[TrialMetricHistory],
) -> Option<String>
fn should_prune( &self, metric_name: &str, current_value: f64, step: usize, history: &[TrialMetricHistory], ) -> Option<String>
Decide whether to prune given the current trial’s metrics and
the history of completed trials’ metrics at the same step. Read more
Auto Trait Implementations§
impl Freeze for MedianPruner
impl RefUnwindSafe for MedianPruner
impl Send for MedianPruner
impl Sync for MedianPruner
impl Unpin for MedianPruner
impl UnsafeUnpin for MedianPruner
impl UnwindSafe for MedianPruner
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