From 84235b6b38e7bfed6bb393bc6a648b79a644a756 Mon Sep 17 00:00:00 2001 From: Zehuan Wang Date: Wed, 17 Jun 2020 11:03:56 -0700 Subject: [PATCH] fix bug of last eval_stop --- HugeCTR/src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/HugeCTR/src/main.cpp b/HugeCTR/src/main.cpp index 55a6f298db..747f90fe67 100644 --- a/HugeCTR/src/main.cpp +++ b/HugeCTR/src/main.cpp @@ -119,15 +119,17 @@ void train(std::string config_file) { size_t train_samples = static_cast(i + 1) * static_cast(solver_config.batchsize); HugeCTR::LOG(timer_log.elapsedMilliseconds(), "train_samples", train_samples); + + std::string epoch_num_str = std::to_string(float(i) / solver_config.max_iter); std::cout << "Hit target accuracy AUC 0.8025 at epoch " + - std::to_string(float(i) / solver_config.max_iter) + " with batchsize: " + epoch_num_str + " with batchsize: " << solver_config.batchsize << " in " << std::setiosflags(std::ios::fixed) << std::setprecision(2) << timer.elapsedSeconds() << " s. Average speed " << float(i) * solver_config.batchsize / timer.elapsedSeconds() << " records/s." << std::endl; - HugeCTR::LOG(timer_log.elapsedMilliseconds(), "eval_stop", 1); + HugeCTR::LOG(timer_log.elapsedMilliseconds(), "eval_stop", epoch_num_str); HugeCTR::LOG(timer_log.elapsedMilliseconds(), "train_epoch_end", 1);