Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 1, 2024
1 parent bedc32c commit 56dc5ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unittests/regression/test_pearson.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,13 @@ def test_single_sample_update():
res2 = metric.compute()
assert torch.allclose(res1, res2)


def test_overwrite_reference_inputs():
"""Test that the normalizations does not overwrite inputs.
Variables var_x, var_y, corr_xy are references to the object variables and get incorrectly scaled down
such that when you update again and compute you get very wrong values.
Variables var_x, var_y, corr_xy are references to the object variables and get incorrectly scaled down such that
when you update again and compute you get very wrong values.
"""
y = torch.randn(100)
y_pred = y + torch.randn(y.shape) / 5
Expand Down

0 comments on commit 56dc5ad

Please sign in to comment.