Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions agents/triggers.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,10 +14,13 @@ def should_check_data_leakage(agent, node: SearchNode) -> bool:
metric_value = node.metric.value
maximize = agent.metric_maximize

# Exact float equality almost never fires in practice: a leaked AUC lands
# on 0.99997, a leaked RMSE on 1.2e-08. Compare against a threshold instead,
# keeping the old exact-1.0 / exact-0.0 cases inside the new bounds.
if maximize:
is_extreme = (metric_value == 1.0)
is_extreme = (metric_value >= agent.acfg.leakage_max_threshold)
else:
is_extreme = (metric_value == 0.0)
is_extreme = (metric_value <= agent.acfg.leakage_min_threshold)

if is_extreme:
logger.info(
Expand Down
3 changes: 3 additions & 0 deletions config/__init__.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -102,6 +102,9 @@ class AgentConfig:
use_evolution: bool = True
use_fusion: bool = True
use_aggregation: bool = True
# Bounds for the data-leakage trigger (see agents/triggers.py).
leakage_max_threshold: float = 0.999
leakage_min_threshold: float = 1e-6
@dataclass
class ExecConfig:
timeout: int
Expand Down
3 changes: 3 additions & 0 deletions config/config.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,6 +56,9 @@ agent:

# --- Submission check ---
check_data_leakage: True
# A metric at or beyond these bounds triggers the data-leakage check.
leakage_max_threshold: 0.999
leakage_min_threshold: 1e-6

# --- Code gen mode ---
use_diff_mode: True # Multi-Mode Codegen
Expand Down