From 2f0f244160681976b2beea318ed2d1f5cdb45b11 Mon Sep 17 00:00:00 2001 From: palmerlao Date: Fri, 19 Jul 2019 16:12:56 -0700 Subject: [PATCH 1/2] Print tag after action scores --- vowpalwabbit/action_score.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vowpalwabbit/action_score.cc b/vowpalwabbit/action_score.cc index 375bf525a02..8dbd917a285 100644 --- a/vowpalwabbit/action_score.cc +++ b/vowpalwabbit/action_score.cc @@ -1,10 +1,11 @@ #include "v_array.h" #include "action_score.h" #include "io_buf.h" +#include "global_data.h" using namespace std; namespace ACTION_SCORE { -void print_action_score(int f, v_array& a_s, v_array&) +void print_action_score(int f, v_array& a_s, v_array& tag) { if (f >= 0) { @@ -16,6 +17,7 @@ void print_action_score(int f, v_array& a_s, v_array&) ss << ','; ss << a_s[i].action << ':' << a_s[i].score; } + print_tag(ss, tag); ss << '\n'; ssize_t len = ss.str().size(); ssize_t t = io_buf::write_file_or_socket(f, ss.str().c_str(), (unsigned int)len); From a326d2cb7af388f58a892899e6fd154493cb2249 Mon Sep 17 00:00:00 2001 From: palmerlao Date: Fri, 19 Jul 2019 16:13:08 -0700 Subject: [PATCH 2/2] Update golden tests --- test/pred-sets/ref/cb_sample_seed.predict | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pred-sets/ref/cb_sample_seed.predict b/test/pred-sets/ref/cb_sample_seed.predict index 98a56d9fb24..8dc0d39b8d1 100644 --- a/test/pred-sets/ref/cb_sample_seed.predict +++ b/test/pred-sets/ref/cb_sample_seed.predict @@ -1,4 +1,4 @@ -1:0.5,0:0.5 +1:0.5,0:0.5 seed=1234 -0:0.5,1:0.5 +0:0.5,1:0.5 seed=1234