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

Fix visual progress bar bug / properly reset progress bar #4579

Merged
merged 11 commits into from
Jan 14, 2021

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Nov 8, 2020

What does this PR do?

Fixes #4567

A visual bug occurs at the very initial state of the progress bar:

Epoch 0:  33%|███▎      | 5/15 [00:05<00:10,  1.01s/it, loss=0.892, v_num=63]
Validating: 0it [00:00, ?it/s]

It shows "0 it" and the total is not displayed. But we can make it show just 0% like so:

Epoch 0:  33%|███▎      | 5/15 [00:05<00:10,  1.01s/it, loss=1.57, v_num=64] 
Validating:   0%|          | 0/10 [00:00<?, ?it/s]

by calling the tqdm.reset() method instead of manually setting the total amount.

This is very hard to spot, because the progress bar usually updates very fast. You have to add a time.sleep to the training loop to observe it.

@awaelchli awaelchli added bug Something isn't working priority: 2 Low priority task labels Nov 8, 2020
@stale
Copy link

stale bot commented Nov 22, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Nov 22, 2020
@awaelchli awaelchli removed the won't fix This will not be worked on label Nov 23, 2020
@stale
Copy link

stale bot commented Dec 7, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Dec 7, 2020
@stale
Copy link

stale bot commented Dec 12, 2020

This pull request is going to be closed. Please feel free to reopen it create a new from the actual master.

@stale stale bot closed this Dec 12, 2020
@Borda Borda deleted the bugfix/progress-reset branch December 13, 2020 22:22
@awaelchli awaelchli removed the won't fix This will not be worked on label Jan 7, 2021
@awaelchli awaelchli restored the bugfix/progress-reset branch January 7, 2021 17:11
@awaelchli awaelchli reopened this Jan 7, 2021
@awaelchli awaelchli changed the title Proper reset of progress bar Proper reset of progress bar [skip ci] Jan 7, 2021
@codecov
Copy link

codecov bot commented Jan 9, 2021

Codecov Report

Merging #4579 (fa80787) into master (d916973) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #4579   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         135     135           
  Lines       10003   10006    +3     
======================================
+ Hits         9326    9329    +3     
  Misses        677     677           

@awaelchli awaelchli marked this pull request as ready for review January 9, 2021 09:35
@awaelchli awaelchli added this to the 1.1.x milestone Jan 9, 2021
@awaelchli awaelchli changed the title Proper reset of progress bar [skip ci] Proper reset of progress bar Jan 9, 2021
@awaelchli awaelchli changed the title Proper reset of progress bar Fix visual progress bar bug / properly reset progress bar Jan 9, 2021
@awaelchli awaelchli added the ready PRs ready to be merged label Jan 11, 2021
@Borda
Copy link
Member

Borda commented Jan 13, 2021

would be fine to merge it after #5495

@awaelchli awaelchli enabled auto-merge (squash) January 14, 2021 00:31
@awaelchli awaelchli merged commit 71d5cc1 into master Jan 14, 2021
@awaelchli awaelchli deleted the bugfix/progress-reset branch January 14, 2021 02:25
Borda added a commit that referenced this pull request Feb 4, 2021
* reset

* fix reset

* changelog

* update chlog

* typing

Co-authored-by: Carlos Mocholí <[email protected]>

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has conflicts priority: 2 Low priority task ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validation progress bar does not update correctly
4 participants