vowpal_wabbit icon indicating copy to clipboard operation
vowpal_wabbit copied to clipboard

VW calls predict twice during learn for cb_explore_adf

Open olgavrou opened this issue 2 years ago • 2 comments

Describe the bug

If you call vw with --cb_explore_adf and an example that does not have a label then predict will be called twice, this seems sub-optimal and un-intuitive for reductions above cb_explore_adf and can cause bugs

e.g. when called with LAS, learn paths would not get full predictions if there is a label missing and -p <file> is specified (see #4273)

If a label is missing during learn what should the reduction contract be? Should learn be called anyway? Should prediction be called? Should we warn? Should we throw?

How to reproduce

input modified from cb_test.ldf file:

shared | s_1 s_2
 | a_1 b_1 c_1
 | a_2 b_2 c_2
 | a_3 b_3 c_3

run with --cb_explore_adf and printing/breakpoint to see that predict gets called twice from cb_explore_adf_common.h

code line

Version

9.5.0

OS

Linux

Language

CLI

Additional context

No response

olgavrou avatar Nov 07 '22 18:11 olgavrou

change to no-op if learn is called without predict and warn if learn is called without a label but at debug log level

olgavrou avatar Nov 17 '22 16:11 olgavrou

can you assign this project .

Gauravmauryaios avatar Apr 02 '23 04:04 Gauravmauryaios