Make the data-leakage trigger reachable - #8
Merged
YoungDubbyDu merged 1 commit intoSep 4, 2026
Conversation
should_check_data_leakage compares the metric with == 1.0 / == 0.0, so the check it guards (check_data_leakage, on by default) effectively never runs: a leaked AUC lands on 0.99997 and a leaked RMSE on 1.2e-08. Compare against configurable bounds instead, chosen conservatively so the exact-1.0 and exact-0.0 cases stay inside the new bounds and ordinary scores do not fire.
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.
should_check_data_leakagecompares the metric with== 1.0/== 0.0, so the check it guards —check_data_leakage, which is on by default inconfig/config.yaml— effectively never runs. Floating-point metrics do not land on exact 1.0 or 0.0.Reproduced against
agents/triggers.pyonmain:So the 117-line
agents/data_leakage_agent.pybehind it is dead code in practice. That matters here because leakage is the main way an ML-engineering agent fakes a medal on MLE-bench.The change. Compare against configurable bounds instead of exact equality, chosen conservatively so the old exact-1.0 / exact-0.0 cases stay inside the new bounds and ordinary scores still do not fire:
Defaults are
leakage_max_threshold: 0.999andleakage_min_threshold: 1e-6— deliberately tight, since a default-on guard must not cry wolf. A leaked logloss of 3.1e-4 does not fire at the default and does at1e-3; the threshold is there to be tuned per metric family.Note on the three-file diff.
config/__init__.pybuilds the authoritative schema withOmegaConf.structured(Config)before merging the YAML, so a key present only inconfig.yamlraisesConfigKeyError. Both files must declare the new fields; I verified that adding them to the YAML alone fails, and that the merge succeeds with both. The fields sit afteruse_aggregationbecause dataclass ordering requires defaulted fields to follow non-defaulted ones.