LLVM: llvm::Logger Class Reference (original) (raw)
Logging utility - given an ordered specification of features, and assuming a scalar reward, allow logging feature values and rewards. More...
Logging utility - given an ordered specification of features, and assuming a scalar reward, allow logging feature values and rewards.
The assumption is that, for an event to be logged (i.e. a set of feature values and a reward), the user calls the log* API for each feature exactly once, providing the index matching the position in the feature spec list provided at construction. The example assumes the first feature's element type is float, the second is int64, and the reward is float:
event 0: logFloatValue(0, ...) logInt64Value(1, ...) ... logFloatReward(...) event 1: logFloatValue(0, ...) logInt64Value(1, ...) ... logFloatReward(...)
At the end, call print to generate the log. Alternatively, don't call logReward at the end of each event, just log{Float|Int32|Int64}FinalReward at the end.
Definition at line 92 of file TrainingLogger.h.