From 1f3d0ab2ccd8d682244956def7709ab15fed2db7 Mon Sep 17 00:00:00 2001 From: Mark Rucker Date: Mon, 9 Oct 2023 15:03:08 -0400 Subject: [PATCH] fix: prevent feature corruption in LRU cache. --- vowpalwabbit/core/src/reductions/eigen_memory_tree.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vowpalwabbit/core/src/reductions/eigen_memory_tree.cc b/vowpalwabbit/core/src/reductions/eigen_memory_tree.cc index f38a340cbfc..a496d8fc905 100644 --- a/vowpalwabbit/core/src/reductions/eigen_memory_tree.cc +++ b/vowpalwabbit/core/src/reductions/eigen_memory_tree.cc @@ -780,10 +780,7 @@ void node_predict(emt_tree& b, learner& base, emt_node& cn, emt_example& ex, VW: auto* closest_ex = node_pick(b, base, cn, ex); ec.pred.multiclass = (closest_ex != nullptr) ? closest_ex->label : 0; ec.loss = (ec.l.multi.label != ec.pred.multiclass) ? ec.weight : 0; - if (closest_ex != nullptr) { - tree_bound(b, closest_ex); - } - + if (closest_ex != nullptr) { tree_bound(b, closest_ex); } } void emt_predict(emt_tree& b, learner& base, VW::example& ec)