Module record

Source
Expand description

Types for recording various values obtained during training and evaluation.

Record is a HashMap, where its key and values represents various values obtained during training and evaluation. A record may contains multiple types of values.

use border_core::record::{Record, RecordValue};

// following values are obtained with some process in reality
let step = 1;
let obs = vec![1f32, 2.0, 3.0, 4.0, 5.0];
let reward = -1f32;

let mut record = Record::empty();
record.insert("Step", RecordValue::Scalar(step as f32));
record.insert("Reward", RecordValue::Scalar(reward));
record.insert("Obs", RecordValue::Array1(obs));

A typical usecase is to record internal values obtained in training processes. Trainer::train, which executes a training loop, writes a record in a Recorder given as an input argument.

Structs§

BufferedRecorder
Buffered recorder.
NullRecorder
A recorder that ignores any record. This struct is used just for debugging.
Record
Represents a record.
RecordStorage
Store records and aggregates them.

Enums§

RecordValue
Represents possible types of values in a Record.

Traits§

AggregateRecorder
Stores records, then aggregates them and writes to an output destination.
Recorder
Writes a record to an output destination with Recorder::write.