Skip to content

Commit

Permalink
Update conditional_contextual_bandit.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits authored Feb 1, 2024
1 parent f6448b8 commit 89254ad
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 89254ad

Please sign in to comment.