-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
How to use tqdm to log progress bars in cloudwatch logs? #966
Comments
I think it's because of the way tqdm erases the progress bar and redraw it in place. But cloudwaatch can not go back in time. You could use
Then you'd get:
|
@casperdcl I saw you recently added this feature: #1491 For context, when running stuff in AWS, I'm trying to have each Previously I had to do something like this:
It works but I need to remember to import I was hopping with your recent change I could use TQDM_POSITION='-1' python -c "
import tqdm
from time import sleep
for _ in tqdm.tqdm(range(5)):
sleep(0.1)
" Gives me:
Do you know what I'm doing wrong? And would you be able to suggest another way to achieve this? |
Why doesn't
print each update to the progress bar on a new line? According to the earlier posts it seems like it should? |
@N-Demir it depends on where you run your python program. For example if I use the terminal, they all go on the same line. But if I run in pycharm they all go on a different line. And if I run in AWS with cloudwatch, again, they all go on a different line |
I have released a package called tqdm-loggable that automatically converts progress bars to time-interval logged messages. When the application is running in a headless mode, progress bar are not displayed, but instead you get a log message at a regular interval during the progress bar running:
|
I want to log progress of my API in cloudwatch. Is it possible to do the same?
The text was updated successfully, but these errors were encountered: