Skip to content

Conversation

@BanzaiTokyo
Copy link
Contributor

No description provided.


assert pytest.approx(precision) == sk_precision
assert pytest.approx(recall) == sk_recall
assert np.allclose(precision, sk_precision, rtol=1e-6)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from what I understand, pytest.approx may convert float32 parameter into float64. This would break on MPS

@github-actions github-actions bot added the module: metrics Metrics module label Apr 23, 2025
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this PR @BanzaiTokyo !
Few more comments to address

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @BanzaiTokyo ! Let's land it if all tests are passing

@vfdev-5 vfdev-5 added this pull request to the merge queue Apr 28, 2025
Merged via the queue into pytorch:master with commit 5caecf2 Apr 28, 2025
17 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: metrics Metrics module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants