Skip to content

Commit 2c83f2b

Browse files
Merge branch 'main' into more-objectives-lightgbm
2 parents 65ad39c + 0e7afbc commit 2c83f2b

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
* Increased the minimum R version to R 4.1.
66

7+
* Fixed bug where `num_threads` argument were ignored for lightgbm engine (#105).
8+
79
# bonsai 0.3.2
810

911
* Resolves a test failure ahead of an upcoming parsnip release (#95).

R/lightgbm.R

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ train_lightgbm <- function(
101101
)
102102

103103
args <- process_bagging(args)
104-
args <- process_parallelism(args)
105104
args <- process_objective_function(args, y)
106105

107106
args <- sort_args(args)
@@ -213,17 +212,6 @@ process_objective_function <- function(args, y) {
213212
args
214213
}
215214

216-
# supply the number of threads as num_threads in params, clear out
217-
# any other thread args that might be passed as main arguments
218-
process_parallelism <- function(args) {
219-
if (!is.null(args["num_threads"])) {
220-
args$num_threads <- args[names(args) == "num_threads"]
221-
args[names(args) == "num_threads"] <- NULL
222-
}
223-
224-
args
225-
}
226-
227215
process_bagging <- function(args) {
228216
if (
229217
args$bagging_fraction != 1 &&

0 commit comments

Comments
 (0)