Skip to content

Commit 84235b6

Browse files
committed
fix bug of last eval_stop
1 parent c6179ab commit 84235b6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

HugeCTR/src/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,17 @@ void train(std::string config_file) {
119119
size_t train_samples =
120120
static_cast<size_t>(i + 1) * static_cast<size_t>(solver_config.batchsize);
121121
HugeCTR::LOG(timer_log.elapsedMilliseconds(), "train_samples", train_samples);
122+
123+
std::string epoch_num_str = std::to_string(float(i) / solver_config.max_iter);
122124

123125
std::cout << "Hit target accuracy AUC 0.8025 at epoch " +
124-
std::to_string(float(i) / solver_config.max_iter) + " with batchsize: "
126+
epoch_num_str + " with batchsize: "
125127
<< solver_config.batchsize << " in " << std::setiosflags(std::ios::fixed)
126128
<< std::setprecision(2) << timer.elapsedSeconds() << " s. Average speed "
127129
<< float(i) * solver_config.batchsize / timer.elapsedSeconds()
128130
<< " records/s." << std::endl;
129131

130-
HugeCTR::LOG(timer_log.elapsedMilliseconds(), "eval_stop", 1);
132+
HugeCTR::LOG(timer_log.elapsedMilliseconds(), "eval_stop", epoch_num_str);
131133

132134
HugeCTR::LOG(timer_log.elapsedMilliseconds(), "train_epoch_end", 1);
133135

0 commit comments

Comments
 (0)