diff options
author | John Langford <jl@hunch.net> | 2013-11-27 23:50:36 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2013-11-27 23:50:36 +0400 |
commit | ae34101f608aa67967b9d161a591480e083b1241 (patch) | |
tree | 1bd25ae33b91ede4e5cc636e275b133637281c62 /vowpalwabbit/simple_label.cc | |
parent | b93df7c93239bb8d67f352f24f00db024af7b1e7 (diff) |
fix holdout evaluation in parallel environments.
Diffstat (limited to 'vowpalwabbit/simple_label.cc')
-rw-r--r-- | vowpalwabbit/simple_label.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vowpalwabbit/simple_label.cc b/vowpalwabbit/simple_label.cc index 8906fc08..0b981776 100644 --- a/vowpalwabbit/simple_label.cc +++ b/vowpalwabbit/simple_label.cc @@ -6,6 +6,7 @@ #include "cache.h" #include "rand48.h" #include "vw.h" +#include "accumulate.h" using namespace std; @@ -235,6 +236,9 @@ bool summarize_holdout_set(vw& all, size_t& no_win_counter) { float thisLoss = (all.sd->weighted_holdout_examples_since_last_pass > 0) ? (float)(all.sd->holdout_sum_loss_since_last_pass / all.sd->weighted_holdout_examples_since_last_pass) : FLT_MAX; + if (all.span_server != "") + thisLoss = accumulate_scalar(all, all.span_server, thisLoss); + all.sd->weighted_holdout_examples_since_last_pass = 0; all.sd->holdout_sum_loss_since_last_pass = 0; |