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

OPSIM-893: bugfix/feature. Update IntRounded for cross-platform repeatability. #15

Merged
merged 4 commits into from
Dec 6, 2023

Conversation

yoachim
Copy link
Member

@yoachim yoachim commented Dec 5, 2023

Updates to IntRounded so behavior is once again repeatable cross-platforms. Have IntRoudned throw an error if a NaN is passed in.

Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (5e7c5ec) 0.00% compared to head (a13cc1e) 0.00%.

Files Patch % Lines
rubin_scheduler/scheduler/features/features.py 0.00% 13 Missing ⚠️
...duler/scheduler/basis_functions/basis_functions.py 0.00% 6 Missing ⚠️
...n_scheduler/scheduler/schedulers/core_scheduler.py 0.00% 5 Missing ⚠️
rubin_scheduler/scheduler/utils/utils.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main     #15   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         88      88           
  Lines       8834    8842    +8     
=====================================
- Misses      8834    8842    +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rhiannonlynne
Copy link
Member

Looks fine, but two questions:

  • is this the cause of all the warning message that were popping up regarding "can't cast as value" (or something similar) when running schedview,
  • would it make sense to have the masking of NaN happen inside the IntRounded call, to safeguard existing behavior

@yoachim
Copy link
Member Author

yoachim commented Dec 6, 2023

Looks fine, but two questions:

* is this the cause of all the warning message that were popping up regarding "can't cast as value" (or something similar) when running schedview,

* would it make sense to have the masking of NaN happen inside the IntRounded call, to safeguard existing behavior
  • yes, this was throwing lots of "can't cast" warnings
  • It would make sense to do the masking inside IntRounded, however, ints do not have any sort of NaN value available in python, so the easy solution is to throw an error if a user tries to send one in.

@yoachim yoachim merged commit e2b429c into main Dec 6, 2023
8 of 9 checks passed
@rhiannonlynne rhiannonlynne deleted the tickets/OPSIM-893 branch December 11, 2023 21:55
@rhiannonlynne rhiannonlynne changed the title Tickets/opsim 893 OPSIM-893: bugfix/feature. Update IntRounded for cross-platform repeatability. Jan 24, 2024
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