Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and cleanups across the codebase, focusing on enforcing correct usage of the bandit interface, improving template instantiation and linkage, cleaning up unnecessary includes, and refining dataset splitting and evaluation logic.
Other minor changes include code cleanup, removal of outdated TODOs, and improved naming for clarity.
Bandit Interface and Error Handling
bandit_setflag andensure_bandit_set()method to theBanditclass to enforce that the bandit operator is initialized before use, raising a clear error otherwise.Template Instantiation and Linkage
extern templatedeclarations forEngineandEvaluationclasses for all supportedProgramTypes, improving build reliability and reducing potential linker errors.Include Cleanup and Build Hygiene
.cppincludes from header files in the bindingsDataset Splitting and Data Handling
Dataset::init()so that, for small classes, training and validation sets never overlap; if a class is too small for validation, it is used only for training. Also removed a redundant condition and cleaned up shuffle logic.Evaluation Metrics and Numerical Stability
average_precision_scoreby tightening the epsilon threshold, usingfabsfor floating-point comparison, and correcting the type ofunique_probastoset<float>. Also fixed the loop bound in PR curve integration.