From adddf339bba43f0b8210f8ccef376966bcc1ac61 Mon Sep 17 00:00:00 2001 From: Joost VandeVondele Date: Wed, 7 Oct 2020 16:07:29 +0200 Subject: [PATCH] Output sfens/second in the trainer, to track performance more easily --- src/learn/learn.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/learn/learn.cpp b/src/learn/learn.cpp index c3335e37..5a540d31 100644 --- a/src/learn/learn.cpp +++ b/src/learn/learn.cpp @@ -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;