Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-lieck committed Sep 13, 2024
1 parent 4cd09a2 commit 36248c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,17 @@ def test_counting_grammar(self):
end = start + idx + 1
insides = rbn.inside_chart[0][start, end].detach().numpy()
try:
self.assertTrue(np.all(np.logical_or(insides == level_insides[idx], insides == 0)))
self.assertTrue(False and np.all(np.logical_or(insides == level_insides[idx], insides == 0)))
except AssertionError:
print(f"(start, end): {(start, end)}")
print(f"idx: {idx}")
print(f"insides: {insides}")
print(f"level_insides: {level_insides}")
print(f"level_insides[idx]: {level_insides[idx]}")
print(f"insides == level_insides[idx]: {insides == level_insides[idx]}")
print(f"insides == 0: {insides == 0}")
print(level_insides[idx], type(level_insides[idx]))
print(insides[0], type(insides[0]))
raise

# check marginal (same as inside of root: first symbol deterministically generated by prior)
Expand Down

0 comments on commit 36248c1

Please sign in to comment.