pub struct ModelStats {
pub moe_union: MoeUnionStats,
pub dumped: DumpLatches,
}Expand description
Per-model diagnostic state.
Fields§
§moe_union: MoeUnionStatsMoE expert-union sampling (ModelLevers::moe_union_stats): calls seen,
calls sampled, and the running unique-expert / slot totals behind the
periodic aggregate line.
dumped: DumpLatchesOne-shot latches for the ATLAS_*_DUMP diagnostics. A latch is per
model so a swap re-arms the dump instead of silently swallowing it.
Implementations§
Source§impl ModelStats
impl ModelStats
pub fn new() -> Self
Sourcepub fn once(&self, key: &'static str) -> bool
pub fn once(&self, key: &'static str) -> bool
true the first time THIS model reaches key, false after.
The general per-model latch. Log-dedup gates used a static Once each,
which is correct for “print this line once” and wrong for “print this
line once per model”: after a swap the new model’s kernel-route and
fallback lines — the ones that say which path a model actually took —
were suppressed by the previous model’s shot, and those lines exist to
be read when a model behaves unexpectedly.
Namespace keys by purpose ("log:...", "dump:...") so two unrelated
sites cannot collide.