-
Notifications
You must be signed in to change notification settings - Fork 5
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 progress bar for unit evalution #20
Conversation
cc @jschueller |
f6de8f6
to
1b51259
Compare
1b51259
to
641cbac
Compare
@@ -574,7 +609,7 @@ def __init__(self, wrapper, backend='multiprocessing', n_cpus=-1, verbosity=10, | |||
|
|||
# This configures how to run samples on the model : | |||
if self.n_cpus == 1: | |||
self._exec_sample = self.wrapper | |||
self._exec_sample = _exec_sample_unit_progress_bar(self.wrapper, verbosity) | |||
|
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.
lets actually allow a "progress_bar" backend keyword, so the condition rewrites if backend=="progress_bar" or self.n_cpus == 1
it should be renamed "serial" though which is more explicit (rename the function _exec_sample_serial too)
tests/test_wrapper.py
Outdated
@@ -8,6 +8,9 @@ def backendtest(backend): | |||
ot.RandomGenerator.SetSeed(0) | |||
n_cpu = multiprocessing.cpu_count() | |||
sizes = [1, n_cpu, n_cpu + 1] | |||
if backend == 'progress_bar': | |||
backend = 'multiprocessing' # default backend not really used | |||
n_cpu = 1 |
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.
then here we could actually drop this and allow for the "serial" backend
641cbac
to
b6e3f56
Compare
b6e3f56
to
f3b6a56
Compare
No description provided.