pulsatrix
Loading...
Searching...
No Matches
pulsatrix::Trial Class Reference

A configuration paired with the metric history observed while evaluating it (instantiate a network under this configuration, train it, record whatever metrics the training loop reports). Deliberately decoupled from SearchSpace – a Trial records what actually happened, a SearchSpace describes what could be proposed; neither needs to reference the other directly. More...

#include <trial.hpp>

Public Member Functions

 Trial (Configuration configuration)
 
const Configuration & configuration () const
 The hyperparameter configuration this trial evaluates.
 
void RecordMetric (std::string tag, double value, int step)
 Records one metric observation.
 
const std::vector< MetricRecord > & metrics () const
 Every metric recorded, in recording order.
 
std::optional< double > LatestMetric (const std::string &tag) const
 The most recently recorded value for tag (by recording order, not by step number – a caller recording out of step order gets the last call's value).
 
std::optional< double > BestMetric (const std::string &tag, bool maximize) const
 The best value recorded for tag.
 

Detailed Description

A configuration paired with the metric history observed while evaluating it (instantiate a network under this configuration, train it, record whatever metrics the training loop reports). Deliberately decoupled from SearchSpace – a Trial records what actually happened, a SearchSpace describes what could be proposed; neither needs to reference the other directly.

Constructor & Destructor Documentation

◆ Trial()

pulsatrix::Trial::Trial ( Configuration  configuration)
inlineexplicit

Member Function Documentation

◆ BestMetric()

std::optional< double > pulsatrix::Trial::BestMetric ( const std::string &  tag,
bool  maximize 
) const
inline

The best value recorded for tag.

Parameters
maximizeIf true, "best" means largest; if false, smallest (e.g. a loss metric should pass maximize = false).
Returns
std::nullopt if tag was never recorded.

◆ configuration()

const Configuration & pulsatrix::Trial::configuration ( ) const
inline

The hyperparameter configuration this trial evaluates.

◆ LatestMetric()

std::optional< double > pulsatrix::Trial::LatestMetric ( const std::string &  tag) const
inline

The most recently recorded value for tag (by recording order, not by step number – a caller recording out of step order gets the last call's value).

Returns
std::nullopt if tag was never recorded.

◆ metrics()

const std::vector< MetricRecord > & pulsatrix::Trial::metrics ( ) const
inline

Every metric recorded, in recording order.

◆ RecordMetric()

void pulsatrix::Trial::RecordMetric ( std::string  tag,
double  value,
int  step 
)
inline

Records one metric observation.


The documentation for this class was generated from the following file: