예제 #1
0
 def test_softmax(self, mocker, lineage: Lineage):
     try:
         _ = lineage.reduce("foo", "bar", normalize_weights="softmax", mode="dist")
     except ValueError:
         pass
     finally:
         mocker.assert_called_once()
예제 #2
0
 def test_row_normalize(self, mocker, lineage: Lineage):
     try:
         _ = lineage.reduce("foo", "bar", mode="scale")
     except ValueError:
         pass
     finally:
         mocker.assert_called_once()
예제 #3
0
 def test_mutual_info(self, mocker, lineage: Lineage):
     try:
         _ = lineage.reduce("foo", "bar", dist_measure="mutual_info", mode="dist")
     except ValueError:
         pass
     finally:
         mocker.assert_called_once()
예제 #4
0
 def test_equal(self, mocker, lineage: Lineage):
     try:
         _ = lineage.reduce("foo", "bar", dist_measure="equal", mode="dist")
     except ValueError:
         pass
     finally:
         # should be twice, but we have extra check inside and we're mocking that does nothing
         mocker.assert_called_once()