-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Implement the core reduction for slates #2347
Implement the core reduction for slates #2347
Conversation
jackgerrits
commented
Mar 18, 2020
- Tested using a mock base reduction and asserting the required transformation takes place
- This is a new way of testing we haven't done before, and I think it could be a great way to build robust and localized tests going forward
- Small refactor to the way CCB prints its decision scores as slates needed to reuse that logic
- Extracted out decision scores into its own header for reuse
- First implementation of reduction, there are opportunities for optimization but with refactors looming it's questionable how valuable it is to do that now vs later
} | ||
else if (slates_label.type == slates::example_type::action) | ||
{ | ||
if (slates_label.slot_id >= num_slots) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation says that std::count_if()
returns a signed int. I'm not sure if its possible to actually get a negative in this case, but something to be aware of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's assigned into a size_t above. While in the docs it is a difference type it also says:
"number of elements satisfying the condition.
That's a pretty annoying API...