From 89254ad947b55fce736c8a347f82d938b94b43c4 Mon Sep 17 00:00:00 2001 From: Jack Gerrits Date: Thu, 1 Feb 2024 11:42:15 -0500 Subject: [PATCH] Update conditional_contextual_bandit.cc --- .../core/src/reductions/conditional_contextual_bandit.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vowpalwabbit/core/src/reductions/conditional_contextual_bandit.cc b/vowpalwabbit/core/src/reductions/conditional_contextual_bandit.cc index ee3db743b11..75762e8ce30 100644 --- a/vowpalwabbit/core/src/reductions/conditional_contextual_bandit.cc +++ b/vowpalwabbit/core/src/reductions/conditional_contextual_bandit.cc @@ -549,11 +549,10 @@ void update_stats_ccb(const VW::workspace& /* all */, shared_data& sd, const ccb auto* outcome = data.slots[i]->l.conditional_contextual_bandit.outcome; if (outcome != nullptr) { + num_labeled++; // It is possible for the prediction to be empty if there were no actions available at the time of taking the // slot decision. In this case it does not contribute to loss. if (preds[i].empty()) { continue; } - - num_labeled++; if (i == 0 || data.all_slots_loss_report) { const float l = VW::get_cost_estimate(outcome->probabilities[VW::details::TOP_ACTION_INDEX], outcome->cost,