-
Notifications
You must be signed in to change notification settings - Fork 65
[ENH] parallelization backends for grid and random search #150
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
Merged
SimonBlanke
merged 16 commits into
hyperactive-project:master
from
fkiraly:parallel-gridsrch
Aug 17, 2025
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b6ee9fb
gridsearch
fkiraly 60cc034
random search
fkiraly 4173725
revert accidental deletion
fkiraly 015a26f
params
fkiraly ff18610
fixes
fkiraly 31cc87f
Update pyproject.toml
fkiraly f565519
new_ackley.update(x)
fkiraly 28d2dbc
better docstrings
fkiraly bb51419
fixes
fkiraly 5894f2d
linting
fkiraly dc8228c
Update _sk.py
fkiraly ac75366
linting
fkiraly 76ec7fe
Update test_parallel.py
fkiraly 40c8dc4
Update test_parallel.py
fkiraly 8694f33
Merge remote-tracking branch 'upstream/master' into parallel-gridsrch
fkiraly 4de7ad4
Update Makefile
fkiraly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| """Common functions used by multiple optimizers.""" | ||
|
|
||
| __all__ = ["_score_params"] | ||
|
|
||
|
|
||
| def _score_params(params, meta): | ||
| """Score parameters, used in parallelization.""" | ||
| meta = meta.copy() | ||
| experiment = meta["experiment"] | ||
| error_score = meta["error_score"] | ||
|
|
||
| try: | ||
| return experiment(**params) | ||
| except Exception: # noqa: B904 | ||
| # Catch all exceptions and assign error_score | ||
| return error_score |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read through the backend_params multiple times and I do not understand how they work. How does the key and value of the dict look like?
We also have two parameters "backend" and "backend_params", that could easily be done in one parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backendselects which parellization backend you want to use, e.g.,"joblib"or `"ray".backend_paramsis a config dict for the backend, which keys you can pass depends on the chosenbackend.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the docstrings, hope that is clearer now?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the key and value of the dict look like? Does the dict have multiple keys? Is the value a list of the strings shown in the docstring text or just one string? Could you write an example into the docstring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the params dict can be a dict with multiple keys, I will add an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added example