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

Random Number Generation in the Future Framework #384

Closed
mabuimo opened this issue Jul 16, 2023 · 1 comment
Closed

Random Number Generation in the Future Framework #384

mabuimo opened this issue Jul 16, 2023 · 1 comment

Comments

@mabuimo
Copy link

mabuimo commented Jul 16, 2023

Hi, I am getting the following warnings when I fit prophet models (prophet.fable) with future::plan(multisession) stated before the model estimation.

 UNRELIABLE VALUE: One of the ‘future.apply’ iterations (‘future_mapply-16’) unexpectedly generated random numbers without declaring so. There is a risk that those random numbers are not statistically sound and the overall results might be invalid. To fix this, specify 'future.seed=TRUE'. This ensures that proper, parallel-safe random numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use 'future.seed = NULL', or set option 'future.rng.onMisuse' to "ignore". 

This resource explains the problem and how to solve it. One option is declaring future.seed=TRUE, presumably here?:

make_future_data <- function(.data, h = NULL){
  n <- get_frequencies(h, .data, .auto = "smallest")
mapply_maybe_parallel <- function (.f, ..., MoreArgs = list(), SIMPLIFY = FALSE) {
  if(is_attached("package:future")){
    require_package("future.apply")

Thanks.

@mitchelloharawild
Copy link
Member

Fixed, thanks!

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

No branches or pull requests

2 participants