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

Cannot work with set.seed() #107

Closed
ShixiangWang opened this issue May 9, 2020 · 4 comments
Closed

Cannot work with set.seed() #107

ShixiangWang opened this issue May 9, 2020 · 4 comments

Comments

@ShixiangWang
Copy link

@ShixiangWang ShixiangWang commented May 9, 2020

I cannot reproduce the result if I use the furrr package, is there something I missed?
I tried furrr::future_options(seed = seed) but still not work. As a control, I can reproduce the result if use purrr::map2.

https://github.com/ShixiangWang/sigminer/blob/e76e59788248ab865ac07112556d92886ecb2197/R/sig_fit_bootstrap_batch.R#L80-L89

@ShixiangWang
Copy link
Author

@ShixiangWang ShixiangWang commented May 13, 2020

Any response?

@you1025
Copy link

@you1025 you1025 commented May 29, 2020

How about this?

furrr::future_map2(
  as.data.frame(catalogue_matrix),
  colnames(catalogue_matrix),
  call_bt,
  y = rownames(catalogue_matrix),
  methods = methods,
  n = n,
  ...,
  .progress = TRUE,
  .options = furrr::future_options(seed = seed) # set options
)
@ShixiangWang
Copy link
Author

@ShixiangWang ShixiangWang commented May 29, 2020

Thanks i will take a try

@ShixiangWang
Copy link
Author

@ShixiangWang ShixiangWang commented May 30, 2020

@you1025 Thanks, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.