Skip to content

Commit

Permalink
Clear cb labels when returning to pool (#1822)
Browse files Browse the repository at this point in the history
* Default labels after using them

* Move to just clearing labels for cb reduction
  • Loading branch information
jackgerrits authored Apr 4, 2019
1 parent 7c221a4 commit 5f7fcdb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions vowpalwabbit/cb_explore_adf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,12 @@ void finish_multiline_example(vw& all, cb_explore_adf& data, multi_ex& ec_seq)
output_example_seq(all, data, ec_seq);
CB_ADF::global_print_newline(all);
}

for (auto x : ec_seq)
{
x->l.cb.costs.clear();
}

VW::clear_seq_and_finish_examples(all, ec_seq);
}

Expand Down
2 changes: 1 addition & 1 deletion vowpalwabbit/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ void parse_example_label(vw& all, example& ec, string label)
words.delete_v();
}

void empty_example(vw& /* all */, example& ec)
void empty_example(vw& /*all*/, example& ec)
{
for (features& fs : ec) fs.clear();

Expand Down

0 comments on commit 5f7fcdb

Please sign in to comment.