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

Remove fault tolerant mode from LF/SF #1481

Merged
merged 2 commits into from
Oct 9, 2019
Merged

Remove fault tolerant mode from LF/SF #1481

merged 2 commits into from
Oct 9, 2019

Conversation

henryre
Copy link
Member

@henryre henryre commented Oct 2, 2019

Description of proposed changes

Stacked with #1480

Remove the fault_tolerant argument from LF/SF definition. This should be specified at apply time, rather than in the LF/SF definition itself. This change also allows us to track e.g. the number of times each LF fails.

Test plan

Remove relevant tests

@henryre henryre requested a review from a team October 2, 2019 06:18
@codecov
Copy link

codecov bot commented Oct 2, 2019

Codecov Report

Merging #1481 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1481      +/-   ##
==========================================
+ Coverage   97.64%   97.65%   +0.01%     
==========================================
  Files          56       56              
  Lines        2078     2093      +15     
  Branches      334      336       +2     
==========================================
+ Hits         2029     2044      +15     
  Misses         22       22              
  Partials       27       27
Impacted Files Coverage Δ
snorkel/slicing/sf/nlp.py 100% <ø> (ø) ⬆️
snorkel/labeling/apply/pandas.py 100% <100%> (ø) ⬆️
snorkel/slicing/sf/core.py 100% <100%> (ø) ⬆️
snorkel/labeling/lf/nlp.py 100% <100%> (ø) ⬆️
snorkel/labeling/apply/core.py 100% <100%> (ø) ⬆️
snorkel/slicing/monitor.py 100% <100%> (ø) ⬆️
snorkel/labeling/apply/dask.py 100% <100%> (ø) ⬆️
snorkel/labeling/lf/core.py 100% <100%> (ø) ⬆️

return 0 if x.num > 42 else -1
db = [3, 6, 43]

@labeling_function(name="my_lf", resources=dict(db=db))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Test a preprocessor here as well, since its one of the args

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.

Yum. Love the -75 LOC. lgtm.

@henryre henryre merged commit be6cec7 into master Oct 9, 2019
@henryre henryre deleted the fault branch October 9, 2019 05:03
henryre added a commit that referenced this pull request Oct 11, 2019
* Remove fault tolerant mode from LF/SF

* Add fault tolerance to appliers (#1480)
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.

None yet

3 participants