- ...
- This is a maintenance update with internal updates only.
future_apply(..., future.globals = list(...))would produce 'Error in if (chunk_size > maxSize) { : missing value where TRUE/FALSE needed'.
- All future.apply functions will now cancel any remaining non-resolved futures if one of the futures produces an error, or a user interrupt (Ctrl-C) is detected. If the backend where the futures are running supports it, the canceled futures are also interrupted, which results in compute resources being freed up sooner and the future.apply function returning sooner.
-
Added
future_Filter(), which is parallel version ofbase::Filter(). -
Added
future_kernapply(), which is parallel version ofstats::kernapply(). -
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.
- Specifying the function
FUNforfuture_by()as a character string is defunct. It should be specified as a function, e.g.FUN = sqrtandFUN = `[[`, which is whatbase::by()requires. Use of a string has been deprecated since future.apply 1.10.0 (2022-11-04).
- Use of
future.seed = TRUEcould result in an error!any(seed_next != seed) is not TRUEin rare cases.
- Relaxed one unit test that triggered an error on 32-bit architectures.
-
Option
future.globals.maxSizewas never passed down to parallel workers. -
The assertion of argument
INDEXoffuture_tapply()would fail with another error in R (< 3.6.0), ifINDEXwas incorrect in the first place.
-
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 acceptsINDEXbeing a formula whenXis 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 acceptsINDICESbeing a formula whenXis a data frames, just asby()does in R (>= 4.3.0). An error is produced if used in R (< 4.3.0).
- 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% TRUEis the same asy <- future_lapply(1:3, FUN = my_fun, future.seed = TRUE).
- Contrary to
lapply(X, ...),future_lapply(X, ...)failed to use method-specific[[subsetting, if the class ofXimplemented one.future_mapply()and other functions had the same problem. The reason was that whenXis partitioned into chunks, it would lose the class attribute before subsetting with[[.
- Functions
future_eapply(),future_lapply(),future_sapply(), andfuture_vapply()failed ifFUNwas specified as the name of a function rather than the function object itself, e.g.future_lapply(1:3, FUN = "sqrt").
- Specifying the function
FUNforfuture_by()as a character string is deprecated, becausebase::by()does not support it. It should be specified as a function, e.g.FUN = sqrtandFUN = `[[`.
- Some warnings and errors showed the wrong call.
- Fix some HTML5 issues in help pages.
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.
- Now captured standard output and conditions are deleted as soon as they have been relayed. This requires future (>= 1.25.0).
- Removed moot argument
future.lazyfrom all functions. Regardless of setting it to TRUE or FALSE, futures would be resolved momentarily and always before the apply returned.
citEntry()in CITATION used argumentnotesinstead ofnote.
-
Add argument
future.envirto allfuture_nnn()functions, which is passed as argumentenvirtofuture(). -
Add option
future.apply.debugfor debugging features specific to this package. It defaults to optionfuture.debug.
- Internal
getGlobalsAndPackagesXApply()now avoids calculating the object size of...arguments if optionfuture.globals.maxSizeis +Inf.
f <- function(...) future_lapply(X, function(x) list(...)); f(a=1)would produce an error on 'unused argument (a = 1)" with the upcoming release of future 1.22.0.
-
The automatic capturing of conditions can be disabled by specifying
future.conditions = NULL. -
Warnings and errors on using the RNG without specifying
future.seedare now tailored to the future.apply package.
future_apply()gained argumentsimplify, which is added to R-devel (to become R 4.1.0).
future_apply(X, FUN, ...)would pass allfuture.*arguments exceptfuture.globals,future.packages, andfuture.labelsto theFUNfunction instead of processing them locally. This would often result in theFUNproducing an error on "unused argument". It also affectedfuture.seednot being applied, which means for someFUNfunctions that did not produce this error, non-reproducible results could have been produced.
- Add
future_.mapply()corresponding to.mapply()in the base package.
future_mapply()would chunk upMoreArgswhenfuture.seed = TRUE.
- 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.
- The assertion of the maximum size of globals per chunk is now
significantly faster for
future_apply().
-
future_lapply(X)andfuture_mapply(FUN, X)would dropnamesargument of the returned empty list whenlength(X) == 0. -
Package could set
.Random.seedto 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.
-
Now
future.conditionsdefaults to the same as argumentconditionsoffuture::future(). If the latter changes, this package will follow. -
Debug messages are now prepended with a timestamp.
- The error "sprintf(...) : 'fmt' length exceeds maximal format length 8192" could be produced when debugging tried to report on too many globals.
- Added
future_by().
-
Attributes
addandignoreof argumentfuture.globalswere ignored although support for them was added in future (>= 1.10.0). -
Validation of L'Ecuyer-CMRG RNG seeds failed in recent R devel.
- Added argument
future.stdoutandfuture.conditionsfor 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).
-
Elements can be processed in random order by setting attribute
orderingto"random"of argumentfuture.chunk.sizeorfuture.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.lazyandfuture.seedto be consistent with ditto arguments offuture::future().
- The license is GPL (>= 2). Previously it was documented as GPL (>= 2.1) but that is a non-existing GPL version.
-
For list objects
XwhereX != 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 overDateobjects were affected.
- 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).
-
Added
future_apply(),future_mapply(), andfuture_Map(). -
Added argument
future.chunk.sizeas an alternative to argumentfuture.schedulingfor 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.schedulingandfuture.chunk.size).
-
future_lapply(X, ...)did not search for globals inX. -
future_vapply()did not return the same dimension names asvapply()whenFUN.VALUEhad no names butFUN(X[[1]])had.
- Test code coverage is 100%.
- Added
future_eapply(),future_tapply(),future_vapply(), andfuture_replicate().
- Package submitted to CRAN.
- Vignette now covers the basics of the package and describes its role in the R package ecosystem together with a road map going forward.
- Added more package tests. Code coverage is currently at 100%.
future_lapply(x, ...)is now much faster and more memory efficient for largexvectors because it uses internalfold()function that is more efficient (memory and speed) version ofbase::Reduce(f, x), especially whenlength(x)is large.
-
Added
future_sapply(). -
Added
future_lapply()- originally from the future package. -
Created package.