Skip to content

Commit

Permalink
Add check for hash_inv when creating json parser (VowpalWabbit#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits authored and Borislav Nikolov committed Mar 7, 2019
1 parent d260eec commit 95260b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vowpalwabbit/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,8 @@ void enable_sources(vw& all, bool quiet, size_t passes)
if (all.opts_n_args.vm.count("json") || all.opts_n_args.vm.count("dsjson"))
{
// TODO: change to class with virtual method
if (all.audit)
// --invert_hash requires the audit parser version to save the extra information.
if (all.audit || all.hash_inv)
{
all.p->reader = &read_features_json<true>;
all.p->audit = true;
Expand Down

0 comments on commit 95260b8

Please sign in to comment.