Просмотр исходного кода

autotune: log arguments before training

Summary: This commit logs the new selected parameters for the autotune right before training the model, making it easy to debug.

Reviewed By: EdouardGrave

Differential Revision: D17627060

fbshipit-source-id: ee12bfabb20331596faaa6e39aec91241beddc74
Onur Çelebi 6 лет назад
Родитель
Сommit
2bef44b36f
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/autotune.cc

+ 2 - 2
src/autotune.cc

@@ -386,6 +386,8 @@ void Autotune::train(const Args& autotuneArgs) {
     trials_++;
 
     trainArgs = strategy_->ask(elapsed_);
+    LOG_VAL(Trial, trials_)
+    printArgs(trainArgs, autotuneArgs);
     ElapsedTimeMarker elapsedTimeMarker;
     double currentScore = std::numeric_limits<double>::quiet_NaN();
     try {
@@ -427,8 +429,6 @@ void Autotune::train(const Args& autotuneArgs) {
     } catch (FastText::AbortError&) {
       break;
     }
-    LOG_VAL(Trial, trials_)
-    printArgs(trainArgs, autotuneArgs);
     LOG_VAL_NAN(currentScore, currentScore)
     LOG_VAL(train took, elapsedTimeMarker.getElapsed())
   }