Skip to content

Conversation

@vabruzzo
Copy link
Contributor

@vabruzzo vabruzzo commented Nov 30, 2025

Fix score_value stop condition race with concurrent trials

Key Changes:

  • Fixed score_value() to filter for finished trials before checking thresholds, preventing false negatives with concurrency
  • Aligns implementation pattern with score_plateau() which already handles this correctly

Changed:

  • dreadnode/optimization/stop.py: Filter to finished_trials before checking score thresholds in score_value()

Bug Details:
When running with concurrency > 1, trials are added to the list in start order but complete out of order. The original code checked trials[-1] which could be a still-running trial when another trial completes.


Generated Summary:

  • In the stop.py, refined the logic to check for finished trials before proceeding, ensuring only completed trials are considered in the stopping criteria.

This summary was generated with ❤️ by rigging

@vabruzzo vabruzzo changed the title bugfix score value race condition bugfix: score value race condition Nov 30, 2025
@vabruzzo vabruzzo changed the title bugfix: score value race condition fix: score value race condition Nov 30, 2025
@vabruzzo vabruzzo requested a review from monoxgas December 1, 2025 16:41
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.

2 participants