Skip to main content

Log

Struct Log 

Source
pub struct Log {
    pub policy: &'static str,
    pub source: &'static str,
    pub xk: Option<u32>,
    pub xs: Option<u32>,
    pub alpha: Option<f64>,
    pub fit: String,
    pub gate: f64,
    pub risk: f64,
    pub attention: Option<String>,
    pub psi: f64,
}
Expand description

What a decision logs: the graded record’s policy and fit, and the #borg-select line.

Fields§

§policy: &'static str

Policy::name.

§source: &'static str

What set this check’s routes: fixed (the fixed rule: under Fixed, Attention on a check without a 3, and Learned at cold start), cap, attention’s cut source (prior, crc, explore; an explore check’s outcomes label the cut, outcome.rs explore), or the learned policy’s (select/policy.rs Decision::source: evidence, experiment, experiment_control, gate when the gate kept the fixed rule, size past policy::SOLVE_MAX, 0.6.0’s learned; reverted when the monitor reverted the store).

§xk: Option<u32>

The randomised question-count test’s k and s at this check (select/policy.rs Decision::xk, xs), logged as the graded record’s xk and xs; None outside the test and under every other policy.

§xs: Option<u32>§alpha: Option<f64>

The tolerance the check was decided under (Ctx::alpha), under every policy so a cold start replays the learned policy at the collective’s α too; None at policy::ALPHA, so the record of a collective without risk stays as before (logged_alpha, read back by alpha_of).

§fit: String

The fit the decision used (select/policy.rs Fit::key); empty for the prior.

§gate: f64

The conservative gate’s budget at this check: how much replayed quality (mistakes avoided) the learned policy may still risk below the fixed rule. Not money: spend is only measured, unless an engineer sets a budget for the collective. 0 at cold start and under every other policy.

§risk: f64

How much of gate this decision takes (select/policy.rs Decision::risk): 0 when it keeps the fixed rule. Replayed, not logged: borg debug select P3 checks it never exceeds gate.

§attention: Option<String>

Attention on a check with a 3: today’s #borg-attention line (attention.rs line), which the hook keeps writing while attention.rs is a sub-policy.

§psi: f64

Each placebo candidate’s chance of the draw (draw_placebo, outcome.rs psi); 0 without a candidate and under the evaluation switches, which draw none.

Implementations§

Source§

impl Log

Source

pub fn line(&self, applied: usize, check: &str) -> String

#borg-select policy=<p> source=<s> fit=<key|-> gate=<B> applied=<m> @<check>: one check’s decision, beside its #borg-graded line; @<check> ties it to the check’s other lines.

Trait Implementations§

Source§

impl Clone for Log

Source§

fn clone(&self) -> Self

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 Log

Source§

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

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

impl Default for Log

Source§

fn default() -> Self

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

impl PartialEq for Log

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Log

Auto Trait Implementations§

§

impl Freeze for Log

§

impl RefUnwindSafe for Log

§

impl Send for Log

§

impl Sync for Log

§

impl Unpin for Log

§

impl UnsafeUnpin for Log

§

impl UnwindSafe for Log

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.