GEGELATI
|
Basic logger that will display some useful information. More...
#include <laBasicLogger.h>
Public Member Functions | |
LABasicLogger (Learn::LearningAgent &la, std::ostream &out=std::cout) | |
Same constructor as LaLogger. Default output is cout. More... | |
virtual void | logHeader () override |
Logs the header (column names) of the tab that will be logged. More... | |
virtual void | logNewGeneration (uint64_t &generationNumber) override |
Logs the generation of training. More... | |
virtual void | logAfterPopulateTPG () override |
Logs the vertices nb of the tpg. More... | |
virtual void | logAfterEvaluate (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results) override |
Logs the min, avg and max score of the generation. More... | |
virtual void | logAfterDecimate () override |
Does nothing in this logger. More... | |
virtual void | logAfterValidate (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results) override |
Logs the min, avg and max score of the generation. More... | |
virtual void | logEndOfTraining () override |
Logs the eval, valid (if doValidation is true) and total running time. More... | |
![]() | |
LALogger (Learn::LearningAgent &la, std::ostream &out=std::cout) | |
Constructor defining a given output and setting start and checkpoint as now. Default output is cout. More... | |
void | chronoFromNow () |
Updates checkpoint to now. | |
virtual void | logHeader ()=0 |
Logs the header (e.g. column names) of this logger. More... | |
virtual void | logNewGeneration (uint64_t &generationNumber)=0 |
Method called by the LearningAgent at the start of a generation. More... | |
virtual void | logAfterPopulateTPG ()=0 |
Method called by the Learning Agent right after PopulateTPG is done. More... | |
virtual void | logAfterEvaluate (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results)=0 |
Method called by the Learning Agent right after the evaluation is done. More... | |
virtual void | logAfterDecimate ()=0 |
Method called by the Learning Agent right after the decimation is done. More... | |
virtual void | logAfterValidate (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results)=0 |
Method called by the Learning Agent right after the validation is done. More... | |
virtual void | logEndOfTraining ()=0 |
Method called by the Learning Agent when the training is done. More... | |
![]() | |
Logger (std::ostream &out=std::cout) | |
Constructor initializing a specific output. Default is cout. More... | |
virtual | ~Logger ()=default |
Virtual default destructor for polyphormism support. | |
Logger | operator<< (std::ostream &(*manip)(std::ostream &)) |
<< operator to manipulate stream and enter stream-specific elements (like std::endl). More... | |
template<typename T > | |
Logger | operator<< (const T &val) |
<< operator allowing to log elements that ostream actually accepts (char, int...). More... | |
Additional Inherited Members | |
![]() | |
bool | doValidation = false |
![]() | |
double | getDurationFrom (const std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > &begin) const |
Computes the duration from a given time to now. More... | |
std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > | getTime () const |
Gets the current time value, for example to set checkpoint. More... | |
![]() | |
std::shared_ptr< std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > > const | start |
std::shared_ptr< std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > > | checkpoint |
double | mutationTime = 0 |
double | evalTime = 0 |
double | validTime = 0 |
Learn::LearningAgent & | learningAgent |
LearningAgent logged by the LALogger. | |
Basic logger that will display some useful information.
The information logged by this LALogger are generation number, nb of vertices, min, mean, avg score of this generation and to finish some timing. Everything is logged like a tab with regularly spaced columns.
|
inlineexplicit |
Same constructor as LaLogger. Default output is cout.
[in] | la | LearningAgent whose information will be logged by the LABasicLogger. |
[in] | out | The output stream the logger will send elements to. |
|
inlineoverridevirtual |
|
overridevirtual |
Logs the min, avg and max score of the generation.
Inherited via LaLogger.
If doValidation is true, it only updates eval time. The method logResults will be called in order to log statistics about results (method shared with logAfterValidate).
[in] | results | scores of the evaluation. |
Implements Log::LALogger.
|
overridevirtual |
|
overridevirtual |
Logs the min, avg and max score of the generation.
Inherited via LaLogger.
If doValidation is true, no eval results are logged so that the logger can only show validation results.
[in] | results | scores of the validation. |
Implements Log::LALogger.
|
overridevirtual |
Logs the eval, valid (if doValidation is true) and total running time.
Inherited via LaLogger
Implements Log::LALogger.
|
overridevirtual |
Logs the header (column names) of the tab that will be logged.
Inherited via LaLogger
Implements Log::LALogger.
|
overridevirtual |
Logs the generation of training.
Inherited via LALogger.
[in] | generationNumber | The number of the current generation. |
Implements Log::LALogger.