VowpalWabbit / py-vowpal-wabbit-next

Experimental new Python bindings for the VowpalWabbit library
https://vowpal-wabbit-next.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
12 stars 5 forks source link

fix!: fix update_stats call for reductions who do not return pred from learn #81

Closed jackgerrits closed 1 year ago

jackgerrits commented 1 year ago

For reduction whose learn does not return a prediction, predict must be called to facilitate the update_stats call. This is unfortunate since that call is only needed to update t. Regardless we need to operate in the constraints of VW as it is currently.

This code could be further improved by not creating the prediction for the learn calls as is done in this quick fix.

Breaking:

When calling learn_one with debug enabled it now returns a list of DebugNodes which is indicative of the fact there may be an additional predict call done now.

Closes #80