Skip to content

Random Number Generation in the Future Framework #384

Closed

Description

@mabuimo

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.

Activity

  1. mitchelloharawild commented on Mar 2, 2024

    @mitchelloharawild
    Member

    Fixed, thanks!

  2. added a commit that references this issue on Mar 29, 2024
    d8fbe73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions