Skip to content

Conversation

@MagnusBuehler
Copy link
Contributor

Motivation and Context

The test "test_normalize_data_basic" randomly failed due to float16 precision. This fix increases the tolerance if the dtype is torch.float16 to 1e-2 instead of the default 1e-3. If this further fails randomly, increase tolerance further.

Public API Changes

  • No Public API changes
  • Yes, Public API changes (Details below)

How Has This Been Tested?

Needs to be tested through future CI runs.

Checklist

  • The changes have been tested locally.
  • Documentation has been updated (if the public API or usage changes).
  • A entry has been added to CHANGELOG.md (if relevant for users).
  • The code follows the project's style guidelines.
  • I have considered the impact of these changes on the public API.

The test "test_normalize_data_basic" randomly failed due to float16 precision. This fix increases the tolerance if the dtype is torch.float16 to 1e-2 instead of the default 1e-3. If this further fails randomly, increase tolerance further.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a randomly failing test, test_normalize_data_basic, by increasing the absolute tolerance for torch.float16 precision. The change is logical and directly solves the issue of floating-point inaccuracies with half-precision floats. My review includes a suggestion to define the new tolerance values as named constants to improve code readability and make future adjustments easier, as hinted in the pull request description.

@noahho noahho merged commit 4f396ea into PriorLabs:main Sep 19, 2025
10 checks passed
@MagnusBuehler MagnusBuehler mentioned this pull request Oct 2, 2025
oscarkey pushed a commit that referenced this pull request Nov 12, 2025
…est (#159)

* Record copied public PR 515

* Increase tolerance for test_normalize_data_basic test (#515)

(cherry picked from commit 4f396ea)

---------

Co-authored-by: mirror-bot <mirror-bot@users.noreply.github.com>
Co-authored-by: MagnusBuehler <111045718+MagnusBuehler@users.noreply.github.com>
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.

2 participants