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.
I use
targetsto manage reproducible data science projects/workflows.Unfortunately I don't have a simple
reprexto share, but I am finding a bug usinglapply(...) + futurize()when usingtargetsto run my scripts. The LLM coding assistant I'm using seemed to think this was a conflict between usingfuturizewithtargetsandbioconductorR packages..In any event, switching from
futurizetofuture.apply::future_lapplyfixed the problem. I'm not sure what is causing the bug withfuturizebut perhaps worth keeping an eye on this and in the meantime anyone else who encounters this bug can just usefuture_lapplyinstead.FWIW here is what Claude said: