Skip to content

Commit 0e7afbc

Browse files
Merge pull request #106 from tidymodels/fix105
2 parents c542ff9 + c01892d commit 0e7afbc

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
@@ -2,6 +2,8 @@
22

33
* Increased the minimum R version to R 4.1.
44

5+
* Fixed bug where `num_threads` argument were ignored for lightgbm engine (#105).
6+
57
# bonsai 0.3.2
68

79
* 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, x, y)
106105

107106
args <- sort_args(args)
@@ -197,17 +196,6 @@ process_objective_function <- function(args, x, y) {
197196
args
198197
}
199198

200-
# supply the number of threads as num_threads in params, clear out
201-
# any other thread args that might be passed as main arguments
202-
process_parallelism <- function(args) {
203-
if (!is.null(args["num_threads"])) {
204-
args$num_threads <- args[names(args) == "num_threads"]
205-
args[names(args) == "num_threads"] <- NULL
206-
}
207-
208-
args
209-
}
210-
211199
process_bagging <- function(args) {
212200
if (
213201
args$bagging_fraction != 1 &&

0 commit comments

Comments
 (0)