Skip to content

test(test_brute_force): Fix fragile test_parallel_optimize_with_sleep#6241

Merged
y0z merged 2 commits intooptuna:masterfrom
gen740:fix_fragile_brute_force_sampler_test
Aug 20, 2025
Merged

test(test_brute_force): Fix fragile test_parallel_optimize_with_sleep#6241
y0z merged 2 commits intooptuna:masterfrom
gen740:fix_fragile_brute_force_sampler_test

Conversation

@gen740
Copy link
Copy Markdown
Member

@gen740 gen740 commented Aug 8, 2025

Motivation

Fix #6206.
Related to #6217, #6209.

test_parallel_optimize_with_sleep is supposed to test avoid_premature_stop. Instead of using sleep to test this behavior, which is potentially fragile, I used the ask-and-tell API instead.

Description of the changes

  • Add test_avoid_premature_stop/test_not_avoid_premature_stop instead of test_parallel_optimize_with_sleep.

@gen740 gen740 force-pushed the fix_fragile_brute_force_sampler_test branch from 6816aac to 3ccf502 Compare August 8, 2025 08:55
@nabenabe0928 nabenabe0928 added the CI Continuous integration. label Aug 13, 2025
Copy link
Copy Markdown
Contributor

@nabenabe0928 nabenabe0928 left a comment

Choose a reason for hiding this comment

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

LGTM!
I left some minor comments:)

@nabenabe0928 nabenabe0928 self-assigned this Aug 14, 2025
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@nabenabe0928 nabenabe0928 left a comment

Choose a reason for hiding this comment

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

Thank you for applying the suggestions, I approved this PR:)

@nabenabe0928 nabenabe0928 removed their assignment Aug 19, 2025
@nabenabe0928 nabenabe0928 added this to the v4.6.0 milestone Aug 19, 2025
Copy link
Copy Markdown
Member

@y0z y0z left a comment

Choose a reason for hiding this comment

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

LGTM

@y0z y0z merged commit 99cfbcc into optuna:master Aug 20, 2025
14 checks passed
@gen740 gen740 deleted the fix_fragile_brute_force_sampler_test branch October 3, 2025 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous integration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI fails frequently after introducing pytest-xdist

3 participants