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

Fix assertion in c-TPE #214

Merged
merged 3 commits into from
Dec 13, 2024
Merged

Fix assertion in c-TPE #214

merged 3 commits into from
Dec 13, 2024

Conversation

eukaryo
Copy link
Contributor

@eukaryo eukaryo commented Dec 13, 2024

Contributor Agreements

Please read the contributor agreements and if you agree, please click the checkbox below.

  • I agree to the contributor agreements.

Tip

Please follow the Quick TODO list to smoothly merge your PR.

Motivation

I want to improve c-TPE implementation.

Description of the changes

There are two assert "Should not reach.", which do not work as intended because bool("Should not reach.") is True.
I replaced them with raise AssertionError("Should not reach."); it may be better than assert False, "Should not reach." since python -O removes asserts.

Copy link
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 the PR!

@nabenabe0928 nabenabe0928 merged commit 2512d76 into optuna:main Dec 13, 2024
4 checks passed
@eukaryo eukaryo deleted the fix_ctpe-assert branch December 14, 2024 05:22
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