Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
norabelrose committed Jan 25, 2024
1 parent 2cff73e commit 2fdd284
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_leace.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ def check_linear_guardedness(
# n x 2 one-hot matrix.
@pytest.mark.parametrize("num_classes", [1, 2, 3, 5, 10, 20])
def test_linear_erasure(num_classes: int):
eps = 2e-9
# Error tolerance for numerical checks. This value is basically "the smallest I can
# empirically make it while still passing the tests". Ideally I'd like to set it
# using the machine epsilon or something, but sklearn convergence isn't quite
# predictable enough to do that.
eps = 4e-9

n, d = 2048, 128
num_distinct = max(num_classes, 2)

Expand Down

0 comments on commit 2fdd284

Please sign in to comment.