-
Notifications
You must be signed in to change notification settings - Fork 35
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
Reset parameters when dimension is changed #905
Conversation
Codecov Report
@@ Coverage Diff @@
## master #905 +/- ##
==========================================
- Coverage 84.56% 84.56% -0.01%
==========================================
Files 40 40
Lines 3882 3887 +5
==========================================
+ Hits 3283 3287 +4
- Misses 599 600 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
A question here is what is the desired behavior? When we reset
Now taking a case like redefining the Some ideas for if you change a (nontime) dimension are:
In this PR I implement (2), which is pretty consistent with how we treat time, but if we remove the |
src/core/dimensions.jl
Outdated
|
||
# check if (1) redefining dim (2) modifying a ModelDef (3) length of dimension has changed | ||
if name!== :time && redefined && (ccd isa ModelDef) && dim_length_change | ||
@warn("The new $name dimension keys have a different length than the original, parameters using that dimension are reset to `missings`, user will need to call `update_param!` to set them.") |
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.
Will remove the warning, useful for testing.
Update: we want this option: parameters with that dimension are completely reset to nothing parameters and the user must update them again |
This PR handles #898