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

align file_refit options with brms #234

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Conversation

GidonFrischkorn
Copy link
Collaborator

Summary

  • Allow "never" and "always" to be passed to file_refit. Throw a warning if "on_change" is passed

Tests

[x] Confirm that all tests passed
[x] Confirm that devtools::check() produces no errors

Release notes

  • the file_refit argument of the bmm function now accepts character string like brms. A warning is given when "on_change" is specified, as this is not currently implemented for bmmodels.

@GidonFrischkorn GidonFrischkorn linked an issue Aug 23, 2024 that may be closed by this pull request
@@ -45,11 +45,11 @@
#' @param file_compress Logical or a character string, specifying one of the
#' compression algorithms supported by [saveRDS] when saving
#' the fitted model object.
#' @param file_refit Logical. Modifies when the fit stored via the `file` argument is
#' @param file_refit Logical or character string. Modifies when the fit stored via the `file` argument is
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can you check if these changes are correct! I was a little confused because previously the documentation states that file_refit = TRUE would lead to re-using a saved model, and file_refit = FALSE would refit the model. I would have expected to be exactly the other way around, and I think this is also what is implemented in the read_bmmfit function.

@GidonFrischkorn GidonFrischkorn added the enhancement - change functionality Change existing function behavior label Aug 23, 2024
@GidonFrischkorn GidonFrischkorn added this to the 1.1.0 milestone Aug 23, 2024
Copy link
Owner

@venpopov venpopov 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. The previous documentation was incorrect

@venpopov venpopov merged commit 46ac699 into develop Aug 23, 2024
2 checks passed
@venpopov venpopov deleted the align-file-refit-brms branch August 23, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement - change functionality Change existing function behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature-request] Add option file_refit from brms
2 participants