Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug an unintended assertion error in GPSampler #5484

Merged

Conversation

nabenabe0928
Copy link
Collaborator

Motivation

As the assertion in GPSampler does not consider float discrete parameters well, an unnecessary error happens.
This PR fixes this problem, c.f.

Description of the changes

Replace == with np.isclose in the assertion.

@nabenabe0928 nabenabe0928 changed the title Address discussion #5483 Debug an unintended assertion error in GPSampler Jun 7, 2024
Copy link
Member

@HideakiImamura HideakiImamura left a comment

Choose a reason for hiding this comment

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

LGTM.

@HideakiImamura HideakiImamura added the code-fix Change that does not change the behavior, such as code refactoring. label Jun 7, 2024
@HideakiImamura
Copy link
Member

@eukaryo Could you review this PR?

Copy link
Collaborator

@eukaryo eukaryo left a comment

Choose a reason for hiding this comment

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

LGTM!

@eukaryo eukaryo merged commit d0c4282 into optuna:master Jun 8, 2024
15 checks passed
@eukaryo eukaryo added this to the v4.0.0 milestone Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-fix Change that does not change the behavior, such as code refactoring.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants