rohitg00/ai-engineering-from-scratch · error · NoTriggerError
no branch crossed the paper threshold
Error message
no branch crossed the paper threshold
What it means
Error "no branch crossed the paper threshold" thrown in rohitg00/ai-engineering-from-scratch.
Source
Thrown at phases/19-capstone-projects/57-end-to-end-research-demo/code/main.py:129
}
def make_seed_hypotheses() -> list[Hypothesis]:
"""Three seed hypotheses, one per research branch. Stand-in for lessons 50-53."""
return [
Hypothesis(id="h-alpha-1", branch="alpha", payload={"q": "method-x"}),
Hypothesis(id="h-beta-1", branch="beta", payload={"q": "method-y"}),
Hypothesis(id="h-gamma-1", branch="gamma", payload={"q": "method-z"}),
]
def pick_best_branch(scheduler_report: SchedulerReport) -> tuple[str, float]:
"""Pick the branch with the highest mean reward among triggered branches.
Ties break alphabetically by branch id (deterministic).
"""
if not scheduler_report.paper_triggers:
raise NoTriggerError("no branch crossed the paper threshold")
by_branch = {b.branch: b for b in scheduler_report.branches}
triggered = [by_branch[name] for name in scheduler_report.paper_triggers if name in by_branch]
if not triggered:
raise BestResultError("trigger list empty after lookup")
triggered.sort(key=lambda b: (-b.mean, b.branch))
best = triggered[0]
return best.branch, best.mean
def _originality_for_reward(reward: float) -> str:
if reward >= 0.8:
return "high"
if reward >= 0.6:
return "medium"
return "low"
def build_mini_paper(branch: str, reward: float) -> MiniPaper:View on GitHub (pinned to 39ea8a1c6d)
When it happens
Trigger: Thrown at phases/19-capstone-projects/57-end-to-end-research-demo/code/main.py:129 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of rohitg00/ai-engineering-from-scratch@39ea8a1c6d (2026-08-26).
Data as JSON: /api/errors/bf05b8284ea170cc.
Report an issue: GitHub.