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

Remove empty lines on no verbosity #71

Merged
merged 1 commit into from
May 23, 2023

Conversation

23pointsNorth
Copy link
Contributor

Clears final new lines on no-verbosity as in: #70

import numpy as np
from hyperactive import Hyperactive


def objective_function(para):
    x, y = para["x"], para["y"]

    return -(x * x + y * y)


search_space = {
    "x": list(np.arange(-10, 10, 0.01)),
    "y": list(np.arange(-10, 10, 0.01)),
}


#hyper = Hyperactive(verbosity=["print_results"])
hyper = Hyperactive(verbosity=False)
hyper.add_search(objective_function, search_space, n_iter=100)
hyper.run()

With the edit, the verbosity of False doesn't add a new line, however, still enteres the for loop if e.g. print_results is enabled.

@SimonBlanke
Copy link
Owner

Nice, thanks for helping out

@SimonBlanke SimonBlanke merged commit bf3a453 into SimonBlanke:master May 23, 2023
7 checks passed
@23pointsNorth 23pointsNorth deleted the patch-2 branch May 23, 2023 14:41
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.

None yet

2 participants