Skip to content

1 regression tests available device #3335 #3403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

BanzaiTokyo
Copy link
Collaborator

test_canberra_metric.py
test_fractional_absolute_error.py
test_fractional_bias.py
test_geometric_mean_absolute_error.py

…al_bias.py, test_geometric_mean_absolute_error.py
@github-actions github-actions bot added the module: metrics Metrics module label May 3, 2025
@BanzaiTokyo BanzaiTokyo marked this pull request as ready for review May 3, 2025 16:28
(torch.rand(size=(100, 1)), torch.rand(size=(100, 1)), 20),
]
return test_cases
np_sum = (2 * np.abs(np_y_pred - np_y) / (np.abs(np_y_pred) + np.abs(np_y))).sum()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's use torch everywhere such that we could also remove import numpy as np

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done, but numpy is still used in _test_distrib_compute

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can do the same there: error = 2 * torch.abs(pred - ground_truth) / (torch.abs(pred) + torch.abs(ground_truth))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, but wouldn't it make more sense to do a separate PR to do a pass on distributed tests?

@vfdev-5 vfdev-5 added this pull request to the merge queue May 5, 2025
Merged via the queue into pytorch:master with commit 5607139 May 5, 2025
14 of 17 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