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,