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

Add tqdm progress bar on label fit method #1649

Merged
merged 5 commits into from
May 25, 2021

Conversation

anerirana
Copy link
Contributor

Fixes #1624

Description of proposed changes

Added a tqdm progress bar when fit() method on LabelModel is called. It updates after each epoch.
tqdm2

When log frequency for loss reporting is enabled, it will be formatted this way.
tqdm3

Please let me know if I should add a progress_bar parameter to fit(), similar to apply() method in PandasLFApplier

Related issue(s)

Fixes #1624

Test plan

No new test has been added, as these changes do not modify the logic

Checklist

Need help on these? Just ask!

  • I have read the CONTRIBUTING document.
  • [n/a] I have updated the documentation accordingly.
  • [n/a] I have added tests to cover my changes.
  • [n/a] I have run tox -e complex and/or tox -e spark if appropriate.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented May 16, 2021

Codecov Report

Merging #1649 (d39c6e9) into master (b3b0669) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1649   +/-   ##
=======================================
  Coverage   97.31%   97.31%           
=======================================
  Files          68       68           
  Lines        2157     2163    +6     
  Branches      348      350    +2     
=======================================
+ Hits         2099     2105    +6     
  Misses         30       30           
  Partials       28       28           
Impacted Files Coverage Δ
snorkel/labeling/model/label_model.py 96.38% <100.00%> (+0.07%) ⬆️

@anerirana
Copy link
Contributor Author

@bhancock8, @brahmaneya, requesting a review for this PR

@anerirana
Copy link
Contributor Author

@bhancock8, @brahmaneya, requesting a review for this PR

@paroma @fredsala

@bhancock8 bhancock8 requested review from vincentschen and bhancock8 and removed request for vincentschen May 20, 2021 20:26
@bhancock8
Copy link
Member

Thank you for this PR contribution, @anerirana! (And apologies for the delay—I was out of office this past week). Yes, I think adding a progress_bar parameter is an excellent idea, to provide an escape hatch for situations where it may become too verbose to be helpful or otherwise interfere with the output of script-based usage. After that, this should be good to go. Just re-ping (re-request review) from me when that's done and I'll be happy to approve.

@anerirana
Copy link
Contributor Author

anerirana commented May 23, 2021

@bhancock8, thanks for the review. Added the progress bar parameter as discussed.

Copy link
Member

@bhancock8 bhancock8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Thanks for the edit and new unit test. Good to merge!

@anerirana
Copy link
Contributor Author

Excellent. Thanks for the edit and new unit test. Good to merge!

@bhancock8 I don't have write access to this repository, you will have to merge the PR.

@bhancock8 bhancock8 changed the title adding tqdm progress bar on label fit method Add tqdm progress bar on label fit method May 25, 2021
@bhancock8 bhancock8 merged commit d6944b9 into snorkel-team:master May 25, 2021
akode pushed a commit to akode/snorkel that referenced this pull request Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show a progress bar on LabelModel.fit
2 participants