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

test_augmented_L_construction failure after updating for networkx 2.5 #1644

Closed thatch closed 3 years ago

thatch commented 3 years ago

Issue description

Seeing as networkx 2.3 is more than a year old, I attempted to perform the trivial node/nodes change to make it work with networkx 2.5.

This uncovered a test failure in test_augmented_L_construction that I do not know enough about what it's doing to be able to fix.

Code example/repro steps

  1. Check out snorkel from git
  2. Apply https://gist.github.com/thatch/aee1a7332f7dbde003410027c0d44f57
  3. pip install -e .; pip install pytest
  4. python -m unittest test.labeling.model.test_label_model
  5. Observe failure in test_augmented_L_construction -- here is the L_aug
[[1. 0. 1. 0. 1. 0. 0. 1. 1. 0.]
 [1. 0. 0. 1. 0. 1. 1. 0. 0. 0.]
 [1. 0. 1. 0. 1. 0. 1. 0. 0. 0.]]

On success, the first j is 4, and the next is 2.

On failure, the first j is 6.

Expected behavior

The test would pass.

System info

Additional context

Add any other context about the problem here.

bhancock8 commented 3 years ago

Hi @thatch, it looks like networkx 2.5 is now the stable version, and from a quick glance its dependencies look compatible with the current state of this project. If you'd like push your changes making the update to a PR, we can review it and just make the update outright.

rjurney commented 3 years ago

@bhancock8 @thatch we need to upgrade networkx too. How does this look re: merging?

bhancock8 commented 3 years ago

The PR resolving the issue has now been merged.