Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃惛馃珫 Fix failing QuatE tests #1070

Merged
merged 3 commits into from
Aug 14, 2022
Merged

馃惛馃珫 Fix failing QuatE tests #1070

merged 3 commits into from
Aug 14, 2022

Conversation

mberr
Copy link
Member

@mberr mberr commented Aug 14, 2022

This PR allows configurable tolerances for testing expected interaction scores. It also improves the error message.

@mberr mberr marked this pull request as ready for review August 14, 2022 11:15
@mberr mberr changed the title Fix failed QuatE tests 馃惛馃珫 Fix failing QuatE tests Aug 14, 2022
if not torch.allclose(scores_f, scores_f_manual, rtol=self.rtol, atol=self.atol):
# allclose checks: | input - other | < atol + rtol * |other|
a_delta = (scores_f_manual - scores_f).abs()
r_delta = (scores_f_manual - scores_f).abs() / scores_f.abs().clamp_min(1.0e-08)
Copy link
Member

Choose a reason for hiding this comment

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

Should this clamp parameter be stored as a variable too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right now, I do not see a reason why we should vary this between different models, so, for now, I would leave it as it is.

@mberr mberr merged commit 46caf13 into master Aug 14, 2022
@mberr mberr deleted the fix-quate-tests branch August 14, 2022 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants