Skip to content

Add safety guard for exhaustive search#6321

Merged
y0z merged 1 commit intooptuna:masterfrom
nabenabe0928:fix-exhaustive-search
Oct 30, 2025
Merged

Add safety guard for exhaustive search#6321
y0z merged 1 commit intooptuna:masterfrom
nabenabe0928:fix-exhaustive-search

Conversation

@nabenabe0928
Copy link
Copy Markdown
Contributor

Motivation

This PR fixes a bug, which does not appear to users.

Description of the changes

  • Add a safety guard in exhaustive search
    • This change mimics the following
    • cf.
      if len(grids) == 1:
      # Do not optimize anything when there's only one choice.
      return initial_params, initial_fval, False

@nabenabe0928 nabenabe0928 added the bug Issue/PR about behavior that is broken. Not for typos/examples/CI/test but for Optuna itself. label Oct 29, 2025
@nabenabe0928 nabenabe0928 added this to the v4.6.0 milestone Oct 29, 2025
Copy link
Copy Markdown
Collaborator

@kAIto47802 kAIto47802 left a comment

Choose a reason for hiding this comment

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

LGTM!

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 7e5f708 into optuna:master Oct 30, 2025
13 checks passed
msakai added a commit to msakai/optunahub-registry that referenced this pull request Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue/PR about behavior that is broken. Not for typos/examples/CI/test but for Optuna itself.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants