Skip to main content

Module auto_tuner

Module auto_tuner 

Source
Expand description

Online auto-tuner machinery for SONA config (ADR-271, Ornith-1.0 borrow #4).

Offline evolution tunes a config to a fixed benchmark. Real workloads drift (non-stationary trajectory streams), so a fixed config goes stale. This module provides the staleness-weighted primitives for an online tuner that re-optimizes against the live stream, weighting recent observations over old ones via Ornith-1.0’s staleness weight w(d_t):

w(d) = 1                       if d <= k1        (fresh — full weight)
     = exp(-lambda*(d - k1))   if k1 < d <= k2   (decaying)
     = 0                       if d  > k2        (too stale — dropped)

where d is the age (clock ticks since the observation). The StalenessWindow maintains a staleness-weighted running estimate of “how well the current config is doing lately”; a (1+1)-ES on top of it (see examples/darwin_autotuner.rs) accepts a perturbed config only when its recent, freshness-weighted score beats the incumbent — so the tuner tracks a drifting optimum instead of averaging over a stale past.

Structs§

StalenessSchedule
Ornith-1.0 staleness schedule w(d_t).
StalenessWindow
A staleness-weighted window of recent scalar observations (e.g. per-step loss under the current config). push advances the clock; weighted_mean reports the freshness-weighted average; observations past k2 are evicted.