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

Bug when using memory_warm_start with non-numerical search space #7

Closed
SimonBlanke opened this issue Jan 14, 2021 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@SimonBlanke
Copy link
Owner

There is a bug in v3.0.2 when using the memory_warm_start and a non-numerical search space. This can be reproduced in the following example:

import pandas as pd
from hyperactive import Hyperactive

def dummy_function(opt):
    return 1

def func1():
    pass

search_space = {
    "obj1": [func1],
}

mem_df = pd.DataFrame([[func1, 1], [func1, 1], [func1, 1]], columns=["obj1", "score"])

hyper = Hyperactive()
hyper.add_search(dummy_function, search_space, n_iter=15, memory_warm_start=mem_df)
hyper.run()
@SimonBlanke SimonBlanke added the bug Something isn't working label Jan 14, 2021
@SimonBlanke SimonBlanke self-assigned this Jan 14, 2021
@SimonBlanke
Copy link
Owner Author

The bug was caused by a missing conversion of the "memory_warm_start" dataframe from the hyperactive search space to the gradient-free-optimizers search space. Gradient-free-optimizers cannot handle non-numerical search spaces.

This bug was resolved in 5db63de by introducing a new class that handles the conversions of parameters and results between hyperactive and gradient-free-optimizers.
The new code is tested in 0519c53.

The fixed version is available in v3.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant