-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
file_refit = "on_change" will work weirdly when renaming factor levels #1128
Comments
I see. Could it make sense to also compare the processed data which each other, that is, |
Currently, we check the Stan data via |
Depending on the data type and how it's created (and even the environment), checking the attributes can unnecessarily trigger a refit. For example, reading a data from CSV file as a data frame, data table, or tibble could change the attributes; same for how the factors are created (if using a different function that store extra attributes). Probably it's safer to add checks for the factor variables (levels and reference level). |
Good points, thank you! |
@hsbadr is right. Actually, I did add the |
Take a look at
|
Factor levels should now be checked as well. |
This is a minor issue I realized about the current implementation of
file_refit = "on_change"
, not sure what to do about it, but posting here for discussion/future reference. If the only change I do to my data is to rename factor levels (while keeping the order the same),the data as passed to Stan will not change, neither will the model code change. So this means that an old fit will be loaded. However, this old fit could break subsequent code as the names of the parameters exposed by the fit will have changed.The text was updated successfully, but these errors were encountered: