Skip to content
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

Print blank lines #31

Open
MaJiapei opened this issue Jun 25, 2024 · 8 comments
Open

Print blank lines #31

MaJiapei opened this issue Jun 25, 2024 · 8 comments

Comments

@MaJiapei
Copy link

o = rb.beast(ts, season='none', start=0, deltat=1,
             quiet=True, print_progress=False, print_options=False)

In above code, even after setting various print prohibitions, blank lines are still printed. This causes the progress bar to display incorrectly when used with the tqdm library for batch calls.

@marinasie
Copy link

I have the same problem. I am running o.rbeast(...) in a loop, and the blank lines clutter my notebook. As a workaround, I suppress it with:

import contextlib, io

  with contextlib.redirect_stdout(io.StringIO()):
      o = rb.beast(...)

@dirt
Copy link
Contributor

dirt commented Jul 29, 2024 via email

@zhaokg
Copy link
Owner

zhaokg commented Jul 31, 2024

I have the same problem. I am running o.rbeast(...) in a loop, and the blank lines clutter my notebook. As a workaround, I suppress it with:

import contextlib, io

  with contextlib.redirect_stdout(io.StringIO()):
      o = rb.beast(...)

Hello JiaPei and Marina,

I posted a new version of Rbeast that doesn't print the empty line if set to the quiet mode. Can you please give it a try?

You can first uninstall the old version by "pip uninstall Rbeast", and then install the new version by "pip install Rbeast==0.1.20".

Hopefully it works on your end. Please let me know if not.

Kaiguang

@marinasie
Copy link

Thanks for the quick update, @zhaokg !
With rb.beast(y, print_progress=False, quiet=True), the blank lines still show up in my notebook 🤔

@dirt
Copy link
Contributor

dirt commented Aug 2, 2024 via email

@MaJiapei
Copy link
Author

MaJiapei commented Aug 2, 2024

Kaiguang

Thank you for the update to version 0.1.20! The issue in rb.beast appears to be resolved.
However, I've noticed that the parameter extra.printOptions = False in rb.beast123 is not working as expected. CPU information is still being printed despite this setting. I would be very grateful if you could look into and fix this bug. Thanks again for your hard work!
微信截图_20240802151708

Jiapei

@marinasie
Copy link

Must have been a fault on my side, sorry! I retook all steps and now it works fine. Sorry for the confusion and thanks a lot for the effort :)

@zhaokg
Copy link
Owner

zhaokg commented Aug 9, 2024

Kaiguang

Thank you for the update to version 0.1.20! The issue in rb.beast appears to be resolved. However, I've noticed that the parameter extra.printOptions = False in rb.beast123 is not working as expected. CPU information is still being printed despite this setting. I would be very grateful if you could look into and fix this bug. Thanks again for your hard work! 微信截图_20240802151708

Jiapei

Jiapei, Thanks a lot for the important feedbacks. I uploaded a new version 0.1.21. I changed the printing behavior for beast123(), and there is also a flag "extra.quiet=True“ to print nothing. Please do let me know if there are any more questions.

Kaiguang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants