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

[DM-31131] lsst.verify outputs non-standard NaN in JSON #88

Merged
merged 2 commits into from Sep 17, 2021

Conversation

afausti
Copy link
Contributor

@afausti afausti commented Sep 14, 2021

Represent metric values that are np.nan (or np.inf) in verify as null when serializing a job to a JSON document. When deserializing a JSON document a metric values that is null is explicitly converted to np.nan.

  • Passes Jenkins CI.
  • Documentation is up-to-date.

Copy link
Contributor

@SimonKrughoff SimonKrughoff left a comment

Choose a reason for hiding this comment

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

Looks good. It might be nice to add a comment that once inf and nan values are turned into None, we assume they are nan for deserialization purposes.

I think we need to add a test for a measurement that contains a NaN

# Resolve quantity
# Resolve quantity, represent None values as np.nan
if value is None:
value = np.nan
Copy link
Contributor

Choose a reason for hiding this comment

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

This means that values that were inf originally will be mapped to np.nan going forward. I guess there is nothing we can really do about that.

@afausti
Copy link
Contributor Author

afausti commented Sep 15, 2021

Running against Jenkins CI again, should be good.

@afausti
Copy link
Contributor Author

afausti commented Sep 15, 2021

It passed Jenkins CI.

Copy link
Contributor

@SimonKrughoff SimonKrughoff left a comment

Choose a reason for hiding this comment

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

Looks great!

@afausti afausti merged commit d85a0f8 into master Sep 17, 2021
@afausti afausti deleted the tickets/DM-31131 branch September 17, 2021 17:22
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