VowpalWabbit / vowpal_wabbit

Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.
https://vowpalwabbit.org
Other
8.49k stars 1.93k forks source link

Execution should fail gracefully when # slots > # actions in CCB call in debug mode #2675

Closed SchuylerGoodman closed 3 years ago

SchuylerGoodman commented 3 years ago

https://github.com/VowpalWabbit/vowpal_wabbit/blob/3f5793d9920fdff44f674cd4252180411da1cff5/vowpalwabbit/conditional_contextual_bandit.cc#L113-L120

In debug mode, when the number of slots input to CCB exceeds the number of actions, execution logs the issue to cerr in and exits learn_and_predict. This results in an unallocated action_ids array later in rl::fb_serializer, which causes a crash.

ataymano commented 3 years ago

Yes, have to be fixed.

ataymano commented 3 years ago

Although, looks like there are 2 issues here:

jackgerrits commented 3 years ago

Ill handle reporting the error in VW