8000 Fix start of tqdm logging in training. by HarshTrivedi · Pull Request #1492 · allenai/allennlp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Fix start of tqdm logging in training. #1492

Merged
merged 4 commits into from
Jul 17, 2018

Conversation

HarshTrivedi
Copy link
Contributor

Before:

2018-07-15 11:08:52,306 - Peak CPU memory usage MB: 839.0656
  0%|          | 0/369 [00:00<?, ?it/s]2018-07-15 11:08:52,321 - Training
accuracy: 0.6882, prec: 0.6277, rec: 0.3557, f1: 0.4541, loss: 0.5876 ||: 100%|##########| 369/369 [00:37<00:00,  9.75it/s]
2018-07-15 11:09:30,161 - Validating
accuracy: 0.6933, prec: 0.7124, rec: 0.6560, f1: 0.6830, loss: 0.5581 ||: 100%|##########| 21/21 [00:00<00:00, 24.23it/s]

After:

2018-07-15 11:10:27,697 - Peak CPU memory usage MB: 839.528448
2018-07-15 11:10:27,707 - Training
accuracy: 0.6882, prec: 0.6277, rec: 0.3557, f1: 0.4541, loss: 0.5876 ||: 100%|##########| 369/369 [00:37<00:00,  9.91it/s]
2018-07-15 11:11:04,929 - Validating
accuracy: 0.6933, prec: 0.7124, rec: 0.6560, f1: 0.6830, loss: 0.5581 ||: 100%|##########| 21/21 [00:00<00:00, 23.49it/s]

On a related note, if descriptions are too long (leads to new line), the tqdm updates doesn't print nice. This is perhaps because tqdm doesn't support multiline bars and am not sure if anything can be done about it! Eg:

screen shot 2018-07-15 at 11 18 41 am

This isn't as such important .. but still if someone has a idea to fix this, let me know.

@nelson-liu
Copy link
Contributor

wrt your second point: there's a slightly hacky fix for this at #1425 (just prepend _ to the name of metrics you don't want to be logged).

@HarshTrivedi
Copy link
Contributor Author

Ok cool, I didn't catch your that fix .. Thanks. I got away with using shorter names, since i needed to view all of them.

@nelson-liu
Copy link
Contributor

fwiw, they're still displayed at validation, just not in the progress bar. but if you want to see them go up/down in real time, then i agree that shortening seems like the best solution.

@HarshTrivedi
Copy link
Contributor Author

Ohh right, I see that now... I need to see that once per epoch only - what you suggest should be good enough.

@DeNeutoy DeNeutoy merged commit 9ec3aa6 into allenai:master Jul 17, 2018
@HarshTrivedi HarshTrivedi deleted the fix-training-tqdm-log branch July 19, 2018 20:28
gabrielStanovsky pushed a commit to gabrielStanovsky/allennlp that referenced this pull request Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0