Skip to content

warn when parallel processing with foreach#878

Merged
simonpcouch merged 5 commits into
mainfrom
foreach-dep
Mar 26, 2024
Merged

warn when parallel processing with foreach#878
simonpcouch merged 5 commits into
mainfrom
foreach-dep

Conversation

@simonpcouch
Copy link
Copy Markdown
Contributor

Related to #866, a revert-ish of e79aac1.

With this PR:

library(tidymodels)

library(doMC)
registerDoMC(10)

res <- fit_resamples(linear_reg(), mpg ~ ., bootstraps(mtcars))
#> Warning: 
#>  ! tune detected a parallel backend registered with foreach but no backend
#>   registered with future.
#> ℹ Support for parallel processing with foreach was soft-deprecated in tune
#>   1.2.1.
#> ℹ See ?parallelism (`?tune::parallelism()`) to learn more.

Created on 2024-03-22 with reprex v2.1.0

Comment thread NEWS.md
@@ -1,5 +1,7 @@
# tune (development version)

* The package will now warn when parallel processing has been enabled with foreach but not with future. See [`?parallelism`](https://tune.tidymodels.org/dev/reference/parallelism.html) to learn more about transitioning your code to future (#878, #866).
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This URL will 404 until merged. :)

Copy link
Copy Markdown
Member

@EmilHvitfeldt EmilHvitfeldt left a comment

Choose a reason for hiding this comment

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

🚀

@simonpcouch simonpcouch merged commit 73692f4 into main Mar 26, 2024
@simonpcouch simonpcouch deleted the foreach-dep branch March 26, 2024 18:18
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions Bot locked and limited conversation to collaborators Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants