Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault in CCB - MTR must clean up predictions allocated for cost sensitive examples #2111

Merged
merged 9 commits into from Oct 14, 2019

Conversation

jackgerrits
Copy link
Member

Fixes #2106

@jackgerrits jackgerrits changed the title Fix segfault in CCB when using MTR and examples are reused Fix segfault in CCB - MTR must clean up predictions allocated for cost sensitive examples Oct 11, 2019
@@ -267,11 +269,13 @@ void cb_adf::learn_MTR(multi_learner& base, multi_ex& examples)
examples[_gen_cs.mtr_example]->weight *= 1.f / clipped_p *
((float)_gen_cs.event_sum / (float)_gen_cs.action_sum);

std::swap(_gen_cs.mtr_ec_seq[0]->pred.a_s, _a_s_mtr_cs);
// TODO!!! cb_labels are not getting properly restored (empty costs are dropped)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment still relevant?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is because this touches predictions and not labels

@peterychang
Copy link
Collaborator

LGTM

@jackgerrits jackgerrits merged commit e245cb8 into VowpalWabbit:master Oct 14, 2019
@jackgerrits jackgerrits deleted the jagerrit/fix_ccb_crash branch April 15, 2021 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CCB crashes when prediction is reused causing memory corruption
2 participants