pub struct Recorder { /* private fields */ }Expand description
Writes down what happened, one record per forward. It owns its store
where a Cache borrows one: a cache is made for one
forward and a recorder counts them.
Implementations§
Source§impl Recorder
impl Recorder
Sourcepub fn over(store: Arc<dyn Store>) -> Self
pub fn over(store: Arc<dyn Store>) -> Self
A recorder over this store, under a name of its own — made here and
readable with run, because a forward in a notebook has
no reason to invent one and still has to be findable.
Sourcepub fn named(store: Arc<dyn Store>, run: impl Into<String>) -> Self
pub fn named(store: Arc<dyn Store>, run: impl Into<String>) -> Self
The same, under a name you chose: a training run that wants to be found again by the name it already has.
Sourcepub fn summarising(
self,
kinds: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn summarising( self, kinds: impl IntoIterator<Item = impl Into<String>>, ) -> Self
The same recorder, with these kinds of fact carried in the record and
not only in the blob, as <kind>.<field>.
Ten thousand losses read one blob at a time is ten thousand round trips
and the number wanted from each is one. Which kinds those are is the
caller’s, so this crate does not learn what a loss is. The last fact
of each kind in a forward is the one carried.
Sourcepub fn run(&self) -> &str
pub fn run(&self) -> &str
What this run is called, which is the first half of every name it writes.
Sourcepub fn said(&self, kind: &str, fields: Vec<(String, String)>)
pub fn said(&self, kind: &str, fields: Vec<(String, String)>)
One fact from a vocabulary that is not the engine’s. It lands in the
forward in flight, or — the normal case for a loss — in the one that
ended last, whose record is rewritten. The fields are text to text
because that is what a record is; the vocabulary is the caller’s.