vowpal_wabbit icon indicating copy to clipboard operation
vowpal_wabbit copied to clipboard

Oracle generation is broken for LDF-mode in search_covington.ipynb

Open lokitoth opened this issue 5 years ago • 3 comments

Some time ago we changed the logic for oracle validation in Python to prevent zeroes from being passed in (see #1296 and #1042). This leads to broken oracle generation. For complex LDF cases, there seems to be additional issues once the oracle generation is fixed that prevents the system from learning correctly.

This issue is a tracking issue for the work to get search to a better place and update the examples to produce the expected output.

lokitoth avatar Dec 04 '19 22:12 lokitoth

Looks like at least part of the issue may be due to bad ternary operator as per #2374

lokitoth avatar Apr 02 '20 18:04 lokitoth

@lokitoth Is there a way to reproduce this isssue?

jackgerrits avatar Jan 13 '22 19:01 jackgerrits

This gets reproduced in the search_covington.ipynb notebook: https://github.com/VowpalWabbit/vowpal_wabbit/blob/master/python/docs/source/examples/search_covington.ipynb

In particular, see the end printout:

testing LDF
[1, 2, -1, 1, 2]
should have printed [ 1 2 -1 4 2 ]

There is strong reason to believe that the core of the search algorithm works properly - I spent time inside of the LDF-specific code-paths, and it did not appear that the issue was there. My current suspicion is that it is a problem either in the python binding layer, or the example is improperly put-together.

Updating title to make it clear what is going on.

lokitoth avatar Jan 27 '22 16:01 lokitoth