dowhy icon indicating copy to clipboard operation
dowhy copied to clipboard

Add progress bar to refutation operations since they take a long time to run

Open amit-sharma opened this issue 3 years ago • 8 comments

Suggested by @sjgenco in #367

This would require

  • usage of tqdm at the appropriate places in the loop for refutation functions.
  • Adding tqdm as a requirement for DoWhy.

amit-sharma avatar Jan 30 '22 06:01 amit-sharma

I'll start on this.

leo-ware avatar Feb 04 '22 21:02 leo-ware

Okay, I've finished adding the progress bars to the refuters themselves. Now, I'm thinking about how to include options to silence them when not needed. I'm thinking to add a keyword argument to CausalRefuter.refute_estimate (like "disable_progress_bar" or smth). Then I probably also need to modify CausalModel.refute_estimate to have this argument also, so that users can silence the progress bars even if they aren't using the refuter object directly.

I will just do this if that works.

leo-ware avatar Mar 04 '22 14:03 leo-ware

yes, that sounds good @leo-ware In the spirit of avoiding double negatives, you may consider show_progress_bar={True/False} (True by default) instead of disable_progress_bar.

In addition, you can add any additional libraries used to the requirements.txt file.

amit-sharma avatar Mar 06 '22 04:03 amit-sharma

I would be willing to work on this, we can add this to the estimator as well.

yemaedahrav avatar Jul 08 '22 04:07 yemaedahrav

thanks, great to hear @yemaedahrav. If you have any questions as you start implementing it, you can ping on the #refutations channel on Discord.

amit-sharma avatar Jul 08 '22 06:07 amit-sharma

I have implemented this with the show_progress_bar={True/False} option. I have made the commit here. Once the other pull request is closed, I will create another PR for this.

yemaedahrav avatar Jul 17 '22 15:07 yemaedahrav

Any updates on this?

alexkreidler avatar Feb 11 '23 23:02 alexkreidler

I guess my PR https://github.com/py-why/dowhy/pull/567 addressed this, this issue can be closed

yemaedahrav avatar Feb 12 '23 02:02 yemaedahrav