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

TestLabelModelAdvanced fails when changing cardinality #1631

Closed talolard closed 3 years ago

talolard commented 3 years ago

Issue description

I run the tests in TestLabelModelAdvanced. The setUp is

    def setUp(self) -> None:
        """Set constants for the tests."""
        self.m = 10  # Number of LFs
        self.n = 10000  # Number of data points
        self.cardinality = 2  # Number of classes

That test passes.

If I change cardinaltiy to 3,4 ... the tests fail.

Code example/repro steps

See above

Expected behavior

The tests should pass regardless of cardinality

System info

Additional context

Relates to #1625 and #1629 .

When I run this test on the classes I've added in #1629 they fail, and I don't know if it's just because of my code or also because the test is "specific"