-
Notifications
You must be signed in to change notification settings - Fork 3.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
Validation loss in progress bar printed line by line #330
Comments
I just checked if that was the version of tqdm by upgrading from |
@annemariet thanks for finding this. Are you using this in jupyter notebook? that might be the issue. But on a usability note, we'll move the early stopping to use keys not in progress_bar or log. Good point! |
Hi, thanks for your quick reply. I'm running this from command line. |
@annemariet this can happen if you resize your terminal window during training. this is a tqdm bug, not PL bug. Re the earlystopping, i just sent a fix yesterday where any of the keys NOT in "progress_bar" or "log" will be used for all callbacks. This is on master now. I can reopen this if you are still having issues |
This actually still happens in Spyder, but works fine in terminal. pytorch-lightning==0.5.3.2 |
Sorry, although I searched for it I had not seen it was already discussed here. I think its still an important open issue. |
I am using Jupyter notebook and this happens in there. Is there a fix for it in Jupyter notebook? I like to develop there before moving to the command line. |
@sudarshan85 it is issue of TQDM, not lightning, we cannot do much about it, try to upgrade... |
@Borda nevertheless we could think of a solution to disable the val-progress bar individually, or otherwise give flexibility |
I'm curious whether something like fastpgross could be included in Lightning. There is also |
One option is to use |
is it just like it, import another |
Sure, it's PR #752. There will be some edge cases where someone is in a notebook environment but doesn't have their widgets set up. In that case they will get a warning message about what to do and their progress bar wont show. So could potentially add a training parameter to override this, which may help those people. FYI: this is how tqdm does the notebook detection |
* use tqdm.auto in trainer This will import the ipywidgets version of tqdm if available. This works nicely in notebooks by not filling up the log. In the terminal it will use the same old tqdm. We might also want to consider passing in the tqdm we want as an argument since there may be some edge cases where ipywidgets is available but the interface doesn't support it (e.g. vscode?) or isn't working. In which case people will get a warning message, but may want to configure it themselves. * use `from tqdm.auto` in eval loop * indents
I will close this in favour of #765 so pls let's continue the discussion there... 🤖 |
This may have introduced a bug. It seems to be caused by multiple workers in dataloader. The error messages are messy with a bunch of embedded exceptions, but it seems the origin is
After finding the discussion here, I changed from tqdm import tqdm as _tqdm and it fixed my problem. |
Common bugs:
checked.
Describe the bug
When adding a "progress_bar" key to the validation_end output, the progress bar doesn't behave as expected and prints one line per iteration, eg:
To Reproduce
Steps to reproduce the behavior:
with some code to run it
Note that both steps 2 and 3 are necessary to reproduce the issue, each separately would run as expected.
Expected behavior
A progress bar on a single line.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
pytorch-lightning==0.5.1.3
torch==1.2.0
Additional context
Actually I ran into this issue after trying to add EarlyStopping, which asked for
val_loss
, which I found out was to be added via the progress_bar metrics... which was quite unexpected for me (I would have had it in "log" or direct key?)The text was updated successfully, but these errors were encountered: