Skip to content

Commit 53e1df8

Browse files
committed
limit number of cores
1 parent c2bfb6b commit 53e1df8

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

R/FilterBoruta.R

+9-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
#' The order of selected features is random.
1111
#' In combination with \CRANpkg{mlr3pipelines}, only the filter criterion `cutoff` makes sense.
1212
#'
13+
#' @section Initial parameter values:
14+
#' - `num.threads`:
15+
#' - Actual default: `NULL`, triggering auto-detection of the number of CPUs.
16+
#' - Adjusted value: 1.
17+
#' - Reason for change: Conflicting with parallelization via \CRANpkg{future}.
18+
#'
1319
#' @references
1420
#' `r format_bib("kursa_2010")`
1521
#'
@@ -43,10 +49,11 @@ FilterBoruta = R6Class("FilterBoruta",
4349
doTrace = p_int(lower = 0, upper = 4, default = 0),
4450
holdHistory = p_lgl(default = TRUE),
4551
getImp = p_uty(),
46-
keep = p_fct(levels = c("confirmed", "tentative"), default = "confirmed")
52+
keep = p_fct(levels = c("confirmed", "tentative"), default = "confirmed"),
53+
num.threads = p_int(lower = 1, default = 1)
4754
)
4855

49-
param_set$set_values(keep = "confirmed")
56+
param_set$set_values(keep = "confirmed", num.threads = 1)
5057

5158
super$initialize(
5259
id = "boruta",

man/mlr3filters-package.Rd

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mlr_filters_boruta.Rd

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test_filter_regr.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ test_that("filters throw errors on missing values", {
3535
})
3636

3737
test_that("Errors for unsupported features", {
38-
skip_if("ames_housing" %nin% mlr_tasks$keys())
39-
task = tsk("ames_housing")
38+
skip_if("california_housing" %nin% mlr_tasks$keys())
39+
task = tsk("california_housing")
4040
filters = mlr_filters$mget(mlr_filters$keys())
4141

4242
# supported: numeric, integer

0 commit comments

Comments
 (0)