futureverse / futureverse/futurize
Potential issue using `futurize` with `targets`?
- Dominant language
- R
- Stars
- 30
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I use `targets` to manage reproducible data science projects/workflows.
Unfortunately I don't have a simple `reprex` to share, but I am finding a bug using `lapply(...) + futurize()` when using `targets` to run my scripts. The LLM coding assistant I'm using seemed to think this was a conflict between using `futurize` with `targets` and `bioconductor` R packages..
In any event, switching from `futurize` to `future.apply::future_lapply` **fixed the problem**. I'm not sure what is causing the bug with `futurize` but perhaps worth keeping an eye on this and in the meantime anyone else who encounters this bug can just use `future_lapply` instead.
FWIW here is what Claude said:
> Error in tar_make():
There are no factory functions for creating 'futurize::add-on' transpilers for package 'BiocGenerics'
>This is a conflict between futurize and BiocGenerics. The futurize() call at the end of the inner lapply is the issue — it's trying to parallelize the results but conflicts with Bioconductor packages loaded in the session.
>**The simplest fix is to replace futurize() with future.apply::future_lapply() directly**, or just remove the parallelization from the inner loop and keep future::plan(multisession) only for the outer lapply using future.apply.
Contributor guide
Assessment
This issue has not been assessed yet.