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

vi_permute reproducibility when using parallel processing #145

Closed
balraadjsings opened this issue Jun 11, 2023 · 1 comment
Closed

vi_permute reproducibility when using parallel processing #145

balraadjsings opened this issue Jun 11, 2023 · 1 comment

Comments

@balraadjsings
Copy link

Running vi_permute() with parallel=TRUE is not reproducible when using set.seed prior to running the function (have not tried other functions in the vip package but it'll probably also apply to them).

It seems set.seed() gets ignored while using parallel processing. Like my previous post, this also seems to be related to foreach. A fix I've found to work for now is to use the package doRNG instead of the set.seed() function e.g.:
registerDoRNG(seed = 123) and then run vi_permute() with parallel=TRUE

This might be something to note in the documentation for when parallelization is used?

@bgreenwell
Copy link
Member

Thanks @balraadjsings, added a link to your suggestion in the vi_permute help page! (Will push to the devel branch soon.)

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