-
-
Notifications
You must be signed in to change notification settings - Fork 87
feat: add mirai parallelization #1314
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
base: main
Are you sure you want to change the base?
Changes from 12 commits
c6f410a
e79da73
a9fa258
e39c244
b98ad9b
9ae87a4
67e6031
c050efa
1cdcfc7
597fa9b
63709a6
6c45a15
3d90df8
8ef3cbb
f511627
1198a7d
8437803
e28bc38
2ee1b76
2e60779
5f08eaa
db0af10
867d128
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,5 @@ | |
^cran-comments\.md$ | ||
^CRAN-SUBMISSION$ | ||
^benchmark$ | ||
^attic$ | ||
^.cursor$ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,3 +183,4 @@ revdep/ | |
# misc | ||
Meta/ | ||
Rplots.pdf | ||
.cursor/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,9 @@ future_map = function(n, FUN, ..., MoreArgs = list()) { | |
if (getOption("mlr3.debug", FALSE)) { | ||
lg$info("Running experiments sequentially in debug mode with %i iterations", n) | ||
mapply(FUN, ..., MoreArgs = MoreArgs, SIMPLIFY = FALSE, USE.NAMES = FALSE) | ||
} else if (requireNamespace("mirai", quietly = TRUE) && mirai::status()$connections) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This only works with the default compute profile There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I didn't want to make it too complicated. What would be the best way to pass the compute profile? We also have to pass it to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest we expose a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not so happy with that because we are introducing parameters for a special backend. Moreover, this argument would then have to be added to all tuning and feature selection functions.
be-marc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
lg$debug("Running resample() via mirai with %i iterations", n) | ||
mirai::collect_mirai(mirai::mirai_map(data.table(...), workhorse, .args = c(MoreArgs, list(is_sequential = FALSE)))) | ||
} else { | ||
is_sequential = inherits(plan(), "sequential") | ||
scheduling = if (!is_sequential && isTRUE(getOption("mlr3.exec_random", TRUE))) structure(TRUE, ordering = "random") else TRUE | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this will automatically prefer mirai over future? Maybe there should be an option for this
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if the user also started a daemon with
mirai::daemons()