HenrikBengtsson / doFuture

:rocket: R package: doFuture - Use Foreach to Parallelize via Future Framework
https://doFuture.futureverse.org
84 stars 6 forks source link

BiocParallel: Workaround for assumptions on foreach error messages #60

Closed HenrikBengtsson closed 3 years ago

HenrikBengtsson commented 3 years ago

Background

BiocParallel's DoParam backend assumes that the error messages produced by foreach match regular expression task ([[:digit:]]+).*, cf. https://github.com/Bioconductor/BiocParallel/issues/132.

Suggestion

Add an R option doFuture.workarounds such that when using:

options(doFuture.workarounds = c("BiocParallel.DoParam.errors"))`

with corresponding R_DOFUTURE_WORKAROUNDS environment variable (comma separated).

doFuture will prefix also its FutureError messages with task <index> such that BiocParallel won't choke on such errors.