Title: | Batch Experiments for 'mlr3' |
Version: | 0.2.1 |
Description: | Extends the 'mlr3' package with a connector to the package 'batchtools'. This allows to run large-scale benchmark experiments on scheduled high-performance computing clusters. |
License: | LGPL-3 |
URL: | https:///mlr3batchmark.mlr-org.com, https://github.com/mlr-org/mlr3batchmark |
BugReports: | https://github.com/mlr-org/mlr3batchmark/issues |
Depends: | R (≥ 3.1.0), batchtools (≥ 0.9.17) |
Imports: | checkmate, data.table, lgr, mlr3 (≥ 0.19.0), mlr3misc, uuid |
Suggests: | renv, rpart, testthat |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2025-05-26 07:29:05 UTC; marc |
Author: | Marc Becker |
Maintainer: | Marc Becker <marcbecker@posteo.de> |
Repository: | CRAN |
Date/Publication: | 2025-05-26 09:20:02 UTC |
mlr3batchmark: Batch Experiments for 'mlr3'
Description
Extends the 'mlr3' package with a connector to the package 'batchtools'. This allows to run large-scale benchmark experiments on scheduled high-performance computing clusters.
Author(s)
Maintainer: Marc Becker marcbecker@posteo.de (ORCID)
Authors:
Michel Lang michellang@gmail.com (ORCID)
Other contributors:
Toby Hocking (ORCID) [contributor]
See Also
Useful links:
Report bugs at https://github.com/mlr-org/mlr3batchmark/issues
Benchmark Experiments on Batch Systems
Description
This function provides the functionality to leave the interface of mlr3 for the computation of benchmark experiments and switch over to batchtools for a more fine grained control over the execution.
batchmark()
populates a batchtools::ExperimentRegistry with jobs in a mlr3::benchmark()
fashion.
Each combination of mlr3::Task and mlr3::Resampling defines a batchtools::Problem,
each mlr3::Learner is an batchtools::Algorithm.
After the jobs have been submitted and are terminated, results can be collected with reduceResultsBatchmark()
which returns a mlr3::BenchmarkResult and thus to return to the interface of mlr3.
Usage
batchmark(
design,
store_models = FALSE,
reg = batchtools::getDefaultRegistry(),
renv_project = NULL
)
Arguments
design |
( |
store_models |
( |
reg |
|
renv_project |
|
Value
data.table::data.table()
with ids of created jobs (invisibly).
Examples
tasks = list(mlr3::tsk("iris"), mlr3::tsk("sonar"))
learners = list(mlr3::lrn("classif.featureless"), mlr3::lrn("classif.rpart"))
resamplings = list(mlr3::rsmp("cv", folds = 3), mlr3::rsmp("holdout"))
design = mlr3::benchmark_grid(
tasks = tasks,
learners = learners,
resamplings = resamplings
)
reg = batchtools::makeExperimentRegistry(NA)
batchmark(design, reg = reg)
batchtools::submitJobs(reg = reg)
reduceResultsBatchmark(reg = reg)
Collect Results from batchmark
Description
Collect the results from jobs defined via batchmark()
and combine them into a mlr3::BenchmarkResult.
Note that ids
defaults to finished jobs (as reported by batchtools::findDone()
).
If a job threw an error, is expired or is still running, it will be ignored with this default.
Just leaving these jobs out in an analysis is not statistically sound.
Instead, try to robustify your jobs by using a fallback learner (c.f. mlr3::Learner).
Usage
reduceResultsBatchmark(
ids = NULL,
store_backends = TRUE,
reg = batchtools::getDefaultRegistry(),
fun = NULL,
unmarshal = TRUE
)
Arguments
ids |
[ |
store_backends |
( |
reg |
[ |
fun |
[ |
unmarshal |
|