JohnLangford/vowpal_wabbit — pull request #452 by trufanov-nok (2014-11-23 12:42:13+00:00)
Title: best constant bug with -c fixed

HI,
I found a bug which was not detected by 'make test' before. The problem appears when VW uses cache input only. For example:
[code]$vw -d file.vw -c -k --passes 2
$vw -d file.vw -c --passes 2[/code]

Second vw call won't print best constant values.
The problem is in the fact that simple_label.c\parse_simple_label() isn't called for cached examples. So my label_count() won't be called too and best_constant function will be sure that VW hadn't observe any examples at all.
Instead of parse_simple_label() vw calls bufread_simple_label() for cached labels. I've just added one line there to invoke my inline function in this case too.
Pull request changes only one file - this fix won't affect autotest files.
It might has sense to add one more test to RunTests script for such case: a call of any test with '-c -passes n' and then same test with just -c. The output will be slightly different (for line with cache status), but all numbers shall be same.