Skip to content

fix: handle failed local searches explicitly in continuous sampling - #51

Merged
WojtAcht merged 3 commits into
mainfrom
fix/failed-minimizations-44
Oct 14, 2026
Merged

WojtAcht merged 3 commits into
mainfrom
fix/failed-minimizations-44

Conversation

@WojtAcht

@WojtAcht WojtAcht commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Closes #44

)

A local search fails when minimize raises ValueError or returns a
non-finite fitness. A failed initial search fails its run; a failed
search after a perturbation is rejected and counts as non-improving.
Results with success=False but finite fitness are still used.

- record minimizer success/status/message in raw_records
- add BasinHoppingResult.run_summary with per-run status
- warn once per sample() when any local search failed
- StepSizeEstimator: divide by evaluated perturbations, skip failed
  samples, raise RuntimeError when nothing can be evaluated
Copilot AI balanced review requested due to automatic review settings October 14, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Warnings raised in joblib worker processes never reached the parent, so
failed local searches were invisible with n_jobs > 1. Workers now return
caught warnings and the parent re-emits them. Also drop stale comments and
a dead finiteness check.
@WojtAcht
WojtAcht merged commit acb7ef3 into main Oct 14, 2026
3 checks passed
@WojtAcht
WojtAcht deleted the fix/failed-minimizations-44 branch October 14, 2026 14:29
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.

Explicit handling of failed minimizations and non-finite fitness in continuous sampling

2 participants