Skip to content

Commit 37e2ec3

Browse files
fix int_pctl() and future.globals = NULL bug (#1100)
Co-authored-by: Hannah Frick <[email protected]>
1 parent c8cc961 commit 37e2ec3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# tune (development version)
22

3+
* Fixed a bug where `int_pctl()` wouldn't work on `last_fit()` outcomes when future parallelism was enabled. (#1099)
4+
35
# tune 2.0.0
46

57
## Changes to `tune_grid()`.

R/parallel.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,11 @@ pctl_call <- function(framework, args = list()) {
449449
future_opts <- list(
450450
future.label = "int-pctl-%d",
451451
future.stdout = TRUE,
452-
future.seed = TRUE,
453-
future.globals = names(args)
452+
future.seed = TRUE
454453
)
454+
if (!is.null(names(args))) {
455+
future_opts$future.globals <- names(args)
456+
}
455457
args <- c(args, future_opts)
456458
}
457459

0 commit comments

Comments
 (0)