-
Notifications
You must be signed in to change notification settings - Fork 611
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
Added TQDM Progressbar for evaluate() #1649
Added TQDM Progressbar for evaluate() #1649
Conversation
May you also update the test cases in https://github.com/tensorflow/addons/blob/master/tensorflow_addons/callbacks/tests/tqdm_progress_bar_test.py ? Thank you so much! |
@shun-lin , please suggest changes. I have got the problem. I think we need to add 4 methods : |
Thanks! I agree with you that those are the methods that we need to add (and maybe for better readability we probably want to refactor the on_test|train_* code so it wouldn't have duplicate, but that can be done later). So because Model.evaluate() is equivalent to running 1 epoch over the testing dataset (see screencast below), we can utilize how we show the progress within each epoch, see Let me know if this is confusing to you, happy to explain it further! Thanks for the contribution! |
@shun-lin , The progress :
Now, I have added code such that it will produce progress bar both in case of The Problems :
Sorry for long comment, the demo of current progress bar is here. Please review it, and suggest changes to resolve problems. Thanks for help! |
@ashutosh1919 great progress and good observations! Couple of remarks.
if you want the extra list to not print, just simply assign it to a variable,
Sincerely, |
@shun-lin , yes you are right. I was thinking the same that we should not display another progress bar in case of But I have very strange temporary idea which I don't think is good : if(nb_epoch==1):
# Came from evaluate()
else:
# Came from fit() |
@ashutosh1919 I would suggest to do the refactoring to remove duplicate code in this PR if you think it's not too much work to do so (I think it's easier to do it in this PR than in the future PR). |
Sure will try to do that today itself then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for your time and contribution!! I have left quite a few comments (mostly on method/variable names), after resolving those comments its pretty much LGTM from me, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 little comments, thanks so much!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one tiny tiny NIT, but other than everything looks good! Thanks so much for the contributions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good, thanks for your contribution!! :)
sorry, didn't see your comment on readability. Please sorry for this. Can you approve it again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good! :)
approved! Will merge after the tests finished running, thanks so much @ashutosh1919 |
@shun-lin , all tests are passing. Merge it anytime if you are fine with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, thanks!
* Added TQDM Progressbar for evaluate() * Resolving errors * Resolving errors * Resolving errors * Resolving errors * Resolving errors * Resolving errors * Resolving errors * Resolving errors * Resolving errors * Resolving errors * Resolving errors * Resolved errors * Resolved errors * Resolved errors * Resolving errors * Resolving errors * resolving errors * Resolved errors * Resolved errors * Resolved errors * Added is_training for distinguishing evaluate() and fit() * test logs * Resolving error related to not displaying of desc at the end of evaluate * undone some unwanted changes * Cleaning up class to remove duplicate code * Modified as per comments * Errors resolved * Lines modified * resolved errors * resolved errors * resolved errors
fixes #1620 .
Although, I couldn't figure out the use of
batch
parameter inon_test_batch_begin
method.@zaccharieramzi and @gabrieldemarmiesse , please review and suggest changes.