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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[F32] Fixes to translate test infrastructure & metric #91

Conversation

FlorianDeconinck
Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck commented Dec 11, 2024

PR #67 up-skilled the translate test to be able to do 32-bit float and introduces a new metric named MultiModalMetric to be able to measure differences at 32-bit float via a mix of different metrics.

This PR aim to fix a couple of missed bugs

  • Fix precision when using make_storage_data. We rely know on the input array being correct instead of trying to fix them. Any incorrect data type should be dealt with in the serialbox side OR as a verbose cast in the test itself.
  • Fix the logic surrounding NaN for the multimodal metric. New comment spells it out now
# Combine all distances into sucess or failure
# Success =
# - no unexpected NANs (e.g. NaN in the ref MUST BE in computation) OR
# - absolute distance pass OR
# - relative distance pass OR
# - ulp distance pass

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

@FlorianDeconinck FlorianDeconinck merged commit 38ee6a6 into NOAA-GFDL:develop Dec 13, 2024
5 checks passed
@FlorianDeconinck FlorianDeconinck deleted the fix/translate_test_storage_precision branch December 13, 2024 14:08
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.

3 participants