Skip to content

Commit

Permalink
Merge branch 'main' into improve_err_msgs_as_task
Browse files Browse the repository at this point in the history
  • Loading branch information
mllg committed Aug 21, 2023
2 parents e3d3fbc + b817b1f commit 5fac620
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# mlr3 0.16.1.9000

* Add `"mlr3.exec_chunk_bins"` option to split the resampling iterations into a number of bins.


# mlr3 0.16.1

* Function `data.table()` is now re-exported.
Expand All @@ -6,7 +11,6 @@
* Add encapsulation mode `"try"`, which works similar to `"none"` but captures errors



# mlr3 0.16.0

* Added argument `paired` to `benchmark_grid()` function, which can be used to create a benchmark design, where
Expand Down
4 changes: 4 additions & 0 deletions R/helper_exec.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ future_map = function(n, FUN, ..., MoreArgs = list()) {
is_sequential = inherits(plan(), "sequential")
scheduling = if (!is_sequential && isTRUE(getOption("mlr3.exec_random", TRUE))) structure(TRUE, ordering = "random") else TRUE
chunk_size = getOption("mlr3.exec_chunk_size", 1)
chunk_bins = getOption("mlr3.exec_chunk_bins")
if (!is.null(chunk_bins)) {
chunk_size = ceiling(n / chunk_bins)
}
stdout = if (is_sequential) NA else TRUE

lg$debug("Running resample() via future with %i iterations", n)
Expand Down
1 change: 1 addition & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#' Note that this does not affect the order of results.
#' * `"mlr3.exec_chunk_size"`: Number of iterations to perform in a single [future::future()] during
#' parallelization with \CRANpkg{future}. Defaults to 1.
#' * `"mlr3.exec_chunk_bins"`: Number of bins to split the iterations into. If set, `"mlr3.exec_chunk_size"` is ignored.
#' * `"mlr3.debug"`: If set to `TRUE`, parallelization via \CRANpkg{future} is disabled to simplify
#' debugging and provide more concise tracebacks.
#' Note that results computed in debug mode use a different seeding mechanism and are **not reproducible**.
Expand Down

0 comments on commit 5fac620

Please sign in to comment.