Changelog
Source:NEWS.md
Version (development version)
Significant changes
- All future.apply functions will now attempt to interrupt any remaining non-resolved futures if a user interrupt (Ctrl-C) is signalled or one of the futures produces an error. For backends that support interruption of futures, this results in the functions return sooner and compute resources are freed up sooner.
New Features
- Now future.apply lets future take care of the generation of parallel RNG seed. Consolidating random number generation to the core package will allow us to add central support for custom parallel RNG methods beyond the built-in L’Ecuyer-CMRG method.
Deprecated and Defunct
Specifying the function
FUN
forfuture_by()
as a character string is defunct. It should be specified as a function, e.g.FUN = sqrt
andFUN = `[[`
, which is whatbase::by()
requires. Use of a string has been deprecated since future.apply 1.10.0 (2022-11-04).Use of
...
as global variables is now considered a mistake. For example, instead off <- function(X, ...) future_lapply(X, function(x) sum(x, ...))
, usef <- function(X, ...) future_lapply(X, function(x, ...) sum(x, ...), ...)
such that...
is passed as arguments.
Version 1.11.1
CRAN release: 2023-12-21
Bug Fixes
Option
future.globals.maxSize
was never passed down to parallel workers.The assertion of argument
INDEX
offuture_tapply()
would fail with another error in R (< 3.6.0), ifINDEX
was incorrect in the first place.
Version 1.11.0
CRAN release: 2023-05-21
Significant Changes
future_tapply()
now accepts data frames as input, just astapply()
does in R (>= 4.3.0).In R (>= 4.3.0),
future_tapply(X, INDEX, ...)
now acceptsINDEX
being a formula whenX
is a data frames, just astapply()
does in R (>= 4.3.0). An error is produced if used in R (< 4.3.0).In R (>= 4.3.0),
future_by(X, INDICES, ...)
now acceptsINDICES
being a formula whenX
is a data frames, just asby()
does in R (>= 4.3.0). An error is produced if used in R (< 4.3.0).
New Features
- Now future operators such as
%globals%
,%seed%
, and%stdout%
can be used to control the correspondingfuture.*
arguments, e.g.y <- future_lapply(1:3, FUN = my_fun) %seed% TRUE
is the same asy <- future_lapply(1:3, FUN = my_fun, future.seed = TRUE)
.
Bug Fixes
- Contrary to
lapply(X, ...)
,future_lapply(X, ...)
failed to use method-specific[[
subsetting, if the class ofX
implemented one.future_mapply()
and other functions had the same problem. The reason was that whenX
is partitioned into chunks, it would lose the class attribute before subsetting with[[
.
Version 1.10.0
CRAN release: 2022-11-05
Bug Fixes
- Functions
future_eapply()
,future_lapply()
,future_sapply()
, andfuture_vapply()
failed ifFUN
was specified as the name of a function rather than the function object itself, e.g.future_lapply(1:3, FUN = "sqrt")
.
Deprecated and Defunct
- Specifying the function
FUN
forfuture_by()
as a character string is deprecated, becausebase::by()
does not support it. It should be specified as a function, e.g.FUN = sqrt
andFUN = `[[`
.
Version 1.9.0
CRAN release: 2022-04-25
Signficant Changes
-
future_mapply()
andfuture_Map()
was updated to match the new behavior ofmapply()
andMap()
in R (>= 4.2.0), which follows the “max-or-0-if-any” recycling rule.
Version 1.8.1
CRAN release: 2021-08-10
Bug Fixes
-
citEntry()
in CITATION used argumentnotes
instead ofnote
.
Version 1.8.0
New Features
Add argument
future.envir
to allfuture_nnn()
functions, which is passed as argumentenvir
tofuture()
.Add option
future.apply.debug
for debugging features specific to this package. It defaults to optionfuture.debug
.
Version 1.6.0
CRAN release: 2020-07-01
Signficant Changes
-
future_apply()
gained argumentsimplify
, which is added to R-devel (to become R 4.1.0).
Bug Fixes
-
future_apply(X, FUN, ...)
would pass allfuture.*
arguments exceptfuture.globals
,future.packages
, andfuture.labels
to theFUN
function instead of processing them locally. This would often result in theFUN
producing an error on “unused argument”. It also affectedfuture.seed
not being applied, which means for someFUN
functions that did not produce this error, non-reproducible results could have been produced.
Version 1.5.0
CRAN release: 2020-04-17
New Features
- Add
future_.mapply()
corresponding to.mapply()
in the base package.
Bug Fixes
-
future_mapply()
would chunk upMoreArgs
whenfuture.seed = TRUE
.
Version 1.4.0
CRAN release: 2020-01-07
New Features
- Now all
future_nnn()
functions set a label on each future that reflects the name of thefuture_nnn()
function and the index of the chunk, e.g."future_lapply-3"
. The format can be controlled by argumentfuture.label
.
Performance
- The assertion of the maximum size of globals per chunk is now significantly faster for
future_apply()
.
Bug Fixes
future_lapply(X)
andfuture_mapply(FUN, X)
would dropnames
argument of the returned empty list whenlength(X) == 0
.Package could set
.Random.seed
to NULL, instead of removing it, which in turn would produce a warning on “‘.Random.seed’ is not an integer vector but of type ‘NULL’, so ignored” when the next random number generated.
Version 1.3.0
CRAN release: 2019-06-18
New Features
Now
future.conditions
defaults to the same as argumentconditions
offuture::future()
. If the latter changes, this package will follow.Debug messages are now prepended with a timestamp.
Version 1.1.0
CRAN release: 2019-01-17
Signficant Changes
- Added argument
future.stdout
andfuture.conditions
for controlling whether standard output and conditions (e.g. messages and warnings) produced during the evaluation of futures should be captured and relayed or not. Standard output is guaranteed to be relayed in the same order as it would when using sequential processing. Analogously for conditions. However, standard output is always relayed before conditions. Errors are always relayed. Relaying of non-error conditions requires future (>= 1.11.0).
New Features
Elements can be processed in random order by setting attribute
ordering
to"random"
of argumentfuture.chunk.size
orfuture.scheduling
, e.g.future.chunk.size = structure(TRUE, ordering = "random")
. This can help improve load balancing in cases where there is a correlation between processing time and ordering of the elements. Note that the order of the returned values is not affected when randomizing the processing order.Swapped order of arguments
future.lazy
andfuture.seed
to be consistent with ditto arguments offuture::future()
.
Version 1.0.1
CRAN release: 2018-08-26
Documentation / Licence
- The license is GPL (>= 2). Previously it was documented as GPL (>= 2.1) but that is a non-existing GPL version.
Bug Fixes
For list objects
X
whereX != as.list(X), future_lapply(X)
did not give the same result aslapply(X)
. Analogously forfuture_vapply(X)
.future_mapply()
could drop class attribute on elements iterated over, because.subset()
was used internally instead of`[`()
. For instance, iteration overDate
objects were affected.
Version 1.0.0
CRAN release: 2018-06-20
Signficant Changes
- License changed from LGPL (>= 2.1) to GPL (>= 2) to make sure it is compatible with the source code adopted from R base’s
apply()
,Map()
,replicate()
,sapply()
, andtapply()
, which are all GPL (>= 2).
New Features
Added
future_apply()
,future_mapply()
, andfuture_Map()
.Added argument
future.chunk.size
as an alternative to argumentfuture.scheduling
for controlling the average number of elements processed per future (“chunk”). In R 3.5.0, the parallel package introduced argumentchunk.size
.The maximum total size of globals allowed (option
future.globals.maxSize
) per future (“chunk”) is now scaled up by the number of elements processed by the future (“chunk”) making the protection approximately invariant to the amount of chunking (argumentsfuture.scheduling
andfuture.chunk.size
).
Bug Fixes
future_lapply(X, ...)
did not search for globals inX
.future_vapply()
did not return the same dimension names asvapply()
whenFUN.VALUE
had no names butFUN(X[[1]])
had.
Version 0.2.0
CRAN release: 2018-05-01
New Features
- Added
future_eapply()
,future_tapply()
,future_vapply()
, andfuture_replicate()
.
Version 0.0.3
Version 0.0.2
Performance
-
future_lapply(x, ...)
is now much faster and more memory efficient for largex
vectors because it uses internalfold()
function that is more efficient (memory and speed) version ofbase::Reduce(f, x)
, especially whenlength(x)
is large.
Version 0.0.0-9000
New Features
Added
future_sapply()
.Added
future_lapply()
- originally from the future package.Created package.