Skip to main content

RefineKeep

Enum RefineKeep 

Source
pub enum RefineKeep {
    Last,
    Best,
}
Expand description

Which state of a refinement walk becomes the injected child.

Selectable because the choice is an empirical claim, and the same rule applies here as to Acquisition: a rule chosen on evidence should stay re-checkable, and a rule rejected on evidence doubly so. make climb and search_health --budget-ab are where the comparison runs.

§Why this is a question at all

A refinement walk renders and featurizes ~40 candidates and injects one. Which one is free to choose — the whole walk is already in the memo, and every trace the kernel returns already carries its own log π_β — so the choice costs nothing either way and has never been measured.

The tension is real in both directions. Self::Last is a draw from where the chain ended up, which respects the target’s own weighting and is robust: it cannot be fooled by a single point where the surrogate happens to be over-optimistic. Self::Best takes the walk’s argmax, which is what a shortlist wants — the pool is not a sample, it is a few dozen patches a person will listen to — but argmax over a surrogate is the classic way to find that surrogate’s errors rather than the user’s preferences.

§The A/B, run, and its result — a tie

make climb SEEDS=16 on both arms, same seed list, so the per-seed lines pair directly:

                       Last              Best
mean gain        +1.927 ± 0.452    +1.774 ± 0.302
median gain      +2.058            +1.819
10% trimmed      +1.840 ± 0.383    +1.925 ± 0.190
climbed on       14/16             15/16

paired (Best − Last)   mean    −0.153 ± 0.384   (−0.40 se)
                       median  −0.185
                       trimmed −0.113 ± 0.318
                       sign     8 better / 8 worse, p = 1.000

Eight and eight is as exact a tie as sixteen seeds can produce. The difference does not clear zero at 2 se on any of the three statistics, so the default stays Self::Last — kept re-checkable rather than deleted, the same way Acquisition::Thompson is kept after losing.

Two things worth reading off it rather than leaving in the table:

  • The feared failure did not happen, and neither did the hoped-for win. The worry was that argmax over a surrogate would find the surrogate’s errors and deepen the catastrophic tail. Across the pair the tails are a wash — the worst Last seed goes −0.74 → −1.80 under Best, and the next two worst go −0.64 → +0.52 and +0.12 → +1.29. Best climbs on one more seed and means marginally less.
  • Best is the lower-variance rule, not the better one. Its trimmed standard error is half Last’s (0.190 against 0.383). Injecting the walk’s argmax is more consistent than injecting where it stopped; it just does not aim anywhere better on average. That is a coherent thing for argmax-over-a-noisy-surrogate to be, and it is the argument to re-run this on if the surrogate ever gets sharper.

Variants§

§

Last

Inject the state the walk ended on. The shipped behaviour, and the default — the A/B above ran and tied, so nothing moved it.

§

Best

Inject the highest-log π_β state the walk occupied, seed included — so a walk that found nothing better than its seed injects nothing.

Trait Implementations§

Source§

impl Clone for RefineKeep

Source§

fn clone(&self) -> RefineKeep

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RefineKeep

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RefineKeep

Source§

fn default() -> RefineKeep

Returns the “default value” for a type. Read more
Source§

impl PartialEq for RefineKeep

Source§

fn eq(&self, other: &RefineKeep) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for RefineKeep

Source§

impl Eq for RefineKeep

Source§

impl StructuralPartialEq for RefineKeep

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,