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 6, 2023
1 parent 80e66b1 commit ad3c23d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unittests/regression/test_kl_divergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ def test_kldivergence_differentiability(self, reduction, p, q, log_prob):
)

# KLDivergence half + cpu does not work due to missing support in torch.clamp
@pytest.mark.skipif(not _TORCH_GREATER_EQUAL_2_1, reason="KLDivergence metric does not support cpu + half precision")
@pytest.mark.skipif(
not _TORCH_GREATER_EQUAL_2_1, reason="KLDivergence metric does not support cpu + half precision"
)
def test_kldivergence_half_cpu(self, reduction, p, q, log_prob):
"""Test dtype support of the metric on CPU."""
self.run_precision_test_cpu(p, q, KLDivergence, kl_divergence, {"log_prob": log_prob, "reduction": reduction})
Expand Down

0 comments on commit ad3c23d

Please sign in to comment.