Closed vincentschen closed 4 years ago
Merging #1559 into master will increase coverage by
0.01%
. The diff coverage is97.56%
.
@@ Coverage Diff @@
## master #1559 +/- ##
==========================================
+ Coverage 97.11% 97.13% +0.01%
==========================================
Files 55 56 +1
Lines 2079 2091 +12
Branches 342 342
==========================================
+ Hits 2019 2031 +12
Misses 31 31
Partials 29 29
Impacted Files | Coverage Δ | |
---|---|---|
snorkel/labeling/model/base_labeler.py | 96.96% <96.96%> (ø) |
|
snorkel/labeling/model/baselines.py | 100.00% <100.00%> (+2.85%) |
:arrow_up: |
snorkel/labeling/model/label_model.py | 95.54% <100.00%> (-0.26%) |
:arrow_down: |
The logic all looks good. The only thing that bugs me is having predict() and score() being strictly pass-through methods on LabelModel
. The duplicated passing of arguments and documentation invites staleness. The documentation demonstrating usage should be covered by unit tests anyway. I'd vote we just let the LabelModel
inherit those methods from its parent.
Discussed IRL. Decision to leave the methods on LabelModel
to keep the Examples
section for the documentation.
Description of proposed changes
predict_proba
toBaseLabeler
class asabtractmethod
predict
,score
,save
, andload
methods toBaseLabeler
class as shared methods in parent classLabelModel(BaseLabeler)
subclass forpredict
andscore
in order to explicitly show docstring examplesTest plan
tox
andtox -e complex
.Checklist
Need help on these? Just ask!
tox -e complex
and/ortox -e spark
if appropriate.