-
-
Notifications
You must be signed in to change notification settings - Fork 71
add section about mirai #880
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?
Conversation
prediction = lrn_rpart$predict(tsk_sonar) | ||
``` | ||
|
||
### Parallelization with `mirai` {#sec-parallel-mirai} |
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.
### Parallelization with `mirai` {#sec-parallel-mirai} | |
### Parallelization with `mirai` (+) {#sec-parallel-mirai} |
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.
- marks that this is a new chapter
mirai::daemons(0) | ||
``` | ||
|
||
With `mlr3` 1.0.0, we integrated the `r ref_pkg("mirai")` package as an alternative parallelization backend. |
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.
we don't mention the version everywhere else.
We start two daemons and check the status of the daemons. | ||
|
||
```{r, eval = FALSE} | ||
library(mirai) |
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.
mention seed,
system.time({resample(tsk_sonar, lrn_rpart, rsmp_cv3)}) | ||
``` | ||
|
||
One advantage of `mirai` is that it eliminates the need to manually set chunk sizes, as it automatically handles task distribution efficiently. |
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.
explain this a bit more in depth
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.
Does this also depend on whether the dispatcher is used, right?
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.
I would maybe explain how the dispatcher sends the tasks to the daemons
With `mlr3` 1.0.0, we integrated the `r ref_pkg("mirai")` package as an alternative parallelization backend. | ||
`mirai` provides a lightweight approach to parallelization by starting persistent R sessions called daemons that evaluate tasks in parallel. | ||
These daemons can be launched either locally or on remote machines via SSH or cluster managers. | ||
Compared to the `r ref_pkg("future")` package, `mirai` has significantly lower overhead per task. |
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.
this is especially advantageous when training many fast fitting models.
No description provided.