snorkel-team / snorkel

A system for quickly generating training data with weak supervision
https://snorkel.org
Apache License 2.0
5.81k stars 857 forks source link

Fix squeeze bug for length 1 array, and inconsistency on requirements and setup.py #1540

Closed brahmaneya closed 4 years ago

brahmaneya commented 4 years ago

Description of proposed changes

Squeezing a length 1 array for used to create a scalar instead of a 1D array as intended. Fixed by adding an extra check. Also made munkres version in setup.py consistent with requirements.

Test plan

Update unit test for changed function.

Checklist

Need help on these? Just ask!

codecov[bot] commented 4 years ago

Codecov Report

Merging #1540 into master will increase coverage by <.01%. The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1540      +/-   ##
==========================================
+ Coverage   97.11%   97.11%   +<.01%     
==========================================
  Files          55       55              
  Lines        2077     2079       +2     
  Branches      341      342       +1     
==========================================
+ Hits         2017     2019       +2     
  Misses         31       31              
  Partials       29       29
Impacted Files Coverage Δ
snorkel/utils/core.py 94.44% <100%> (+0.21%) :arrow_up: