Skip to content

Enforce hard evaluation budgets and checkpoint-safe runs#46

Merged
isty2e merged 6 commits into
mainfrom
fix/hard-evaluation-budget-checkpoints
Jul 2, 2026
Merged

Enforce hard evaluation budgets and checkpoint-safe runs#46
isty2e merged 6 commits into
mainfrom
fix/hard-evaluation-budget-checkpoints

Conversation

@isty2e

@isty2e isty2e commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

This PR makes evaluation budgeting strict by default. Study.run(...) and Study.optimize(...) now charge max_evaluations against reported logical evaluation cost, including local-search inner evaluations, rather than only counting returned records. Callers that want the old outer-record behavior can still pass count_evaluation_cost=False.

It also adds stop_at_checkpoint_boundary=True so CSA runs can return the latest checkpoint-safe state when the budget ends inside an unsafe generation segment. Structured and SciPy local-search kernels now reserve enough budget for later proposals in the same batch before spending extra local-search evaluations.

User impact

This is a behavior change for code that relied on the old default budget accounting. Over-budget reported evaluation cost now raises EvaluationBudgetExhausted instead of silently assimilating an over-budget step. The changelog and local-optimization/checkpointing docs call out the migration path.

Validation

  • uv run --python 3.11 --extra test ruff check pyproject.toml src tests
  • uv run --python 3.11 --extra test basedpyright src tests
  • uv run --python 3.11 --extra test pytest tests -q
  • mypy src/variopt still reports the existing scipy/joblib missing-stub errors only; the branch-introduced kernel error is gone.

@isty2e isty2e merged commit 3054e20 into main Jul 2, 2026
3 checks passed
@isty2e isty2e deleted the fix/hard-evaluation-budget-checkpoints branch July 2, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant