futureverse / futureverse/futurize

Potential issue using `futurize` with `targets`?

Open
#7 4 comments 0 reactions 0 assignees View on GitHub
documentation
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.