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

Hotfix for legacy metric error comparison #73

Closed
wants to merge 10 commits into from

Conversation

oelbert
Copy link
Collaborator

@oelbert oelbert commented Sep 5, 2024

Description
The comparison in LegacyMetric if np.isnan(metric_err) or (metric_err > worst_metric_err): can fail if all metric errors are negative real numbers, leading to no "worst index" being assigned and causing a memory error. It also means large negative errors won't be considered as bad as small positive ones, which is undersirable. This PR fixes that by comparing the absolute value of the errors to find the worst.

Fixes #72

How Has This Been Tested?
Physics translate tests have been run with this

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

@oelbert oelbert closed this Sep 5, 2024
@oelbert oelbert deleted the hotfix/legacy_metric branch September 5, 2024 20:57
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.

error comparison bug in legacymetric
1 participant