Output sfens/second in the trainer, to track performance more easily

This commit is contained in:
Joost VandeVondele
2020-10-07 16:07:29 +02:00
committed by nodchip
parent 3f55b3af42
commit adddf339bb

View File

@@ -28,6 +28,7 @@
#include "tt.h"
#include "uci.h"
#include "search.h"
#include "timeman.h"
#include "extra/nnue_data_binpack_format.h"
@@ -845,9 +846,11 @@ namespace Learner
// so at this timing the generation of the replacement table is updated.
// It doesn't matter if you have disabled the substitution table.
TT.new_search();
TimePoint elapsed = now() - Search::Limits.startTime + 1;
cout << "PROGRESS: " << now_string() << ", ";
cout << sr.total_done << " sfens";
cout << sr.total_done << " sfens, ";
cout << sr.total_done * 1000 / elapsed << " sfens/second";
cout << ", iteration " << epoch;
cout << ", learning rate = " << global_learning_rate << ", ";
@@ -1930,6 +1933,8 @@ namespace Learner
{
auto& limits = Search::Limits;
limits.startTime = now();
// Make the search equivalent to the "go infinite" command. (Because it is troublesome if time management is done)
limits.infinite = true;