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

Add error messages and unit tests for setups where min_budget >= max_budget #46

Merged
merged 7 commits into from
Aug 1, 2023

Conversation

Bronzila
Copy link
Collaborator

Before we simply used an assertion and printed:

Only (Max Budget > Min Budget) is supported for DEHB.

Now we log an error with same message if min_budget <= max_budget, but we also add an additional error if min_budget == max_budget, guiding the user to use plain DE (values are obviously filled with values specified by the user, apart from configspace and target_function):

2023-07-25 16:54:19.802 | ERROR    | src.dehb.optimizers.dehb:__init__:75 - Only (Max Budget > Min Budget) is supported for DEHB.
2023-07-25 16:54:19.803 | ERROR    | src.dehb.optimizers.dehb:__init__:77 - If you have a fixed fidelity, you can instead run DE as follows: AsyncDE(cs=configspace, f=target_function, dimensions=1, pop_size=2, max_age=inf, mutation_factor=0.5, crossover_prob=0.5, strategy=rand1_bin, budget=27, boundary_fix_type=random)

@Bronzila Bronzila requested a review from Neeratyoy July 25, 2023 15:25
@Bronzila Bronzila linked an issue Jul 25, 2023 that may be closed by this pull request
Copy link
Collaborator

@Neeratyoy Neeratyoy left a comment

Choose a reason for hiding this comment

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

Looks good. Maybe one more iteration and we can merge.

src/dehb/optimizers/dehb.py Outdated Show resolved Hide resolved
src/dehb/optimizers/dehb.py Outdated Show resolved Hide resolved
tests/test_dehb.py Outdated Show resolved Hide resolved
@Bronzila
Copy link
Collaborator Author

Just checked: both using n_workers and passing a dask Client is safe. I think this can be merged now. @Neeratyoy

@Neeratyoy Neeratyoy merged commit adac335 into development Aug 1, 2023
13 of 14 checks passed
@Neeratyoy
Copy link
Collaborator

I leave the timing of the branch cleaning part to you for now. Thanks!

@Bronzila Bronzila deleted the min_max branch August 2, 2023 09:56
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.

Handling min_budget = max_budget situation
2 participants