-
Notifications
You must be signed in to change notification settings - Fork 97
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
Benchmark improvements #598
Conversation
90d77f8
to
2b60c2e
Compare
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.
Thanks for the PR :)
On the parallelism of runs, I originally set them to run sequentially so the time and memory monitoring would be accurate.
If there is a reliable way to measure those while running the instances in parallel, I'm all for it! Though I don't think the current implementation is. I changed the inner structure quite a bit in #593, it might be easier to integrate parallelism with these.
I like the random search idea, though we should also have a way to set the seed, for reproducibility.
else: | ||
parametrization = list(product(parametrize)) | ||
if not (n_random_search is None): |
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.
Can be simplified:
if not (n_random_search is None): | |
if n_random_search is not None: |
@@ -199,7 +219,7 @@ def exec_func(*args, **kwargs) -> Dict[str, List[float]]: | |||
"there is therefore nothing to monitor for. ", | |||
stacklevel=2, | |||
) | |||
return df | |||
return None |
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.
Same thing:
return None | |
return |
Can you:
|
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.
A few comments. Happy to discuss IRL if useful
@@ -0,0 +1,95 @@ | |||
import pytest |
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.
Please add a short module-level docstring describing what this does
@@ -0,0 +1,95 @@ | |||
import pytest | |||
from benchmarks.utils import monitor, repr_func # replace with the actual import path |
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.
Out of curiosity: is this supposed to work without installation? I'm a bit surprised that it does.
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.
Yes, it does work, since there is an __init__.py
file in benchmarks/
:)
@@ -1,11 +1,13 @@ | |||
import tracemalloc | |||
import random |
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.
Can we have a small module-level docstring that describe what this file does?
@LilianBoulard this might be useful for the gapencoder benchmark
@jovan-stojanovic