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

Rework/1297 #1477

Merged
merged 2 commits into from
Oct 1, 2019
Merged

Rework/1297 #1477

merged 2 commits into from
Oct 1, 2019

Conversation

HiromuHota
Copy link
Contributor

Description of proposed changes

This PR upgrade tqdm to >=4.33.0, which is now compatible with pandas==0.25.0

See tqdm/tqdm#780

Related issue(s)

Fixes #1297

Test plan

Checklist

Need help on these? Just ask!

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

Copy link
Member

@henryre henryre left a comment

Choose a reason for hiding this comment

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

@HiromuHota awesome, thanks for sorting this out! tqdm is disabled in most of our unit tests, so just as a sanity check, were you able to run a PandasLFApplier using tqdm with these package versions?

@HiromuHota
Copy link
Contributor Author

@henryre Thanks for your comment.
I quickly did a sanity check using the Spouse tutorial and the progress bar worked.
Below is a console log.

>>> from snorkel.labeling import PandasLFApplier
>>> 
>>> lfs = [
...     lf_husband_wife,
...     lf_husband_wife_left_window,
...     lf_same_last_name,
...     lf_married,
...     lf_familial_relationship,
...     lf_family_left_window,
...     lf_other_relationship,
...     lf_distant_supervision,
...     lf_distant_supervision_last_names,
... ]
>>> applier = PandasLFApplier(lfs)
>>> 
>>> from snorkel.labeling import LFAnalysis
>>> 
>>> L_dev = applier.apply(df_dev)
/Users/hiromu/workspace/snorkel/.env/lib/python3.7/site-packages/tqdm/std.py:648: FutureWarning: The Panel class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version
  from pandas import Panel
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2811/2811 [00:06<00:00, 451.24it/s]
>>> L_train = applier.apply(df_train)
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 22254/22254 [00:50<00:00, 444.79it/s]
>>> 
>>> 
>>> tqdm.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'tqdm' is not defined
>>> import tqdm
>>> tqdm.__version__
'4.36.1'
>>> pandas.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'pandas' is not defined
>>> pd.__version__
'0.25.1'

By the way, I confirmed that the first commit of the two (871dcae) failed the travis on my travis account (https://travis-ci.com/HiromuHota/snorkel/builds/129603857).
Hope this information also helps.

Copy link
Member

@henryre henryre left a comment

Choose a reason for hiding this comment

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

@HiromuHota awesome, then we're good to go here. Thanks again!!

@HiromuHota
Copy link
Contributor Author

@henryre Thanks for your approval.
CONTRIBUTING.md says

The PR author owns the test plan and has final say on correctness. Therefore, it is up to the PR author to merge their PR.

but I have no write access hence cannot merge this PR. How can I merge it?

@henryre
Copy link
Member

henryre commented Oct 1, 2019

@HiromuHota ah that's a good point, I'll update the CONTRIBUTING doc, thanks!

@henryre henryre merged commit 98834a8 into snorkel-team:master Oct 1, 2019
@HiromuHota HiromuHota deleted the rework/1297 branch October 1, 2019 00:13
@henryre henryre mentioned this pull request Oct 1, 2019
henryre pushed a commit that referenced this pull request Oct 11, 2019
* Confirm pandas==0.25.0 is not compatible with tqdm<4.33.0

* Upgrade tqdm to >=4.33.0, which is now compatible with pandas==0.25.0

See tqdm/tqdm#780
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.

2 participants