-
Notifications
You must be signed in to change notification settings - Fork 57
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
Jd/change axes checks #1211
Jd/change axes checks #1211
Conversation
Performance Results
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1211 +/- ##
==========================================
- Coverage 77.24% 76.96% -0.29%
==========================================
Files 121 121
Lines 13446 13536 +90
==========================================
+ Hits 10387 10418 +31
- Misses 3059 3118 +59
Flags with carried forward coverage won't be shown. Click here to find out more.
|
src/simulation/simulation_state.jl
Outdated
@@ -158,7 +158,12 @@ function _initialize_system_states!( | |||
dm_cols = get_column_names(key, get_dataset(decision_states, key)) | |||
if has_dataset(emulator_states, key) | |||
em_cols = get_column_names(key, get_dataset(emulator_states, key)) | |||
@assert_op dm_cols == em_cols | |||
@assert_op length(dm_cols) == length(em_cols) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick check: asserts are for guarding against programmer errors and can be optimized out in production. Errors are for all bad inputs and are always enabled. Should these two checks be of the same type or are they correct as they are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was originally an assertion but in recent simulation cases there are situations where the data coming might* not have the same devices so I switched to an error. Before I never accounted for the possibility for this to be the result of input errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So then should line 161 be a call to error()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should remove that, I put it while I was debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed via 256029e
No description provided.