-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow me to turn off progress notification #1264
Comments
Will it works if we add flag def report_metrics(
self,
*,
data_source="test",
X=None,
y=None,
scoring=None,
scoring_names=None,
pos_label=None,
scoring_kwargs=None,
show_progress=True # Parameter Here
): And set progress context progress_context = tqdm if show_progress else nullcontext Then append into score inside if metric_name is not None :
metrics_kwargs["metric_name"] = metric_name
with progress_context():
scores.append(
metric_fn(
data_source=data_source,
X=X,
y=y,
**metrics_kwargs,
) Then might report.metrics.report_metrics(show_progress=False).to_html() will be solved @MarieS-WiMLDS ? |
Maybe the change by @ictorv that we merge yesterday is actually resolving the problem spotted by @koaning: now the progress bars are transient, meaning that they disappear once the computation to stop taking vertical space that is indeed annoying and pollute the output. Would it be enough @koaning or you are really do not want them? |
If we need to explicitly turn them off even during processing, then I think that we should have a set_config(show_progress=False) # deactivate the progress
report = CrossValidationReport(...)
# or as a context manager
with config_context(show_progress=False):
report = CrossValidationReport(...) Such config could be useful in the future for instance to return |
If it goes away automatically now/soon then that can also work. The context manager could also work. |
Thanks for the feedback. As discussed above, due to #1255, would it be ok to close this? cc @MarieS-WiMLDS |
I think we can keep it open to implement the context configuration. |
As a dev, the progress bar makes my work more difficult. For example when debugging with ipdb, my input gets hidden and replaced with the progress bar. My current solution is the apply a custom patch that removes all progress bar logic before starting work. |
I'm still up for implementing the configuration thingy. @auguste-probabl what is the reason for the debugger to not work? I would think that the current implementation is just a decorator? Is it that your debugger get caught in the progress bar thread? |
Yes, something like this |
Describe the bug
In this codeblock you can see that I am trying to wrap around
report.metrics.metrics_report()
. However, it always displays the progress bar. Can we turn this off? It makes sense when called directly but it is in the way when I try to build something that wraps around it.Steps/Code to Reproduce
Just call
.metrics.metrics_report
on the cross validation report.Expected Behavior
Have a flag to turn it off.
Actual Behavior
There is no such flag.
Environment
The text was updated successfully, but these errors were encountered: