+
Skip to content

Conversation

be-marc
Copy link
Member

@be-marc be-marc commented May 23, 2025

No description provided.

prediction = lrn_rpart$predict(tsk_sonar)
```

### Parallelization with `mirai` {#sec-parallel-mirai}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
### Parallelization with `mirai` {#sec-parallel-mirai}
### Parallelization with `mirai` (+) {#sec-parallel-mirai}

Copy link
Member

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.
Copy link
Member

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)
Copy link
Member

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.
Copy link
Member

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

Copy link
Member

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?

Copy link
Member

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.
Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载