tidyverts / tidyverts/fabletools
Parallelisation only happens when `future` is attached than loaded
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 98
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/tidyverts/fabletools/blob/9794d225a37e79aaab18655692eca54bb3e1aed7/R/model.R#L100
future::plan(future::multisession)
rlang::is_attached("package:future")
#> [1] FALSE
library(future)
rlang::is_attached("package:future")
#> [1] TRUE
Created on 2022-06-27 by the reprex package (v2.0.1)
Is this an intended behaviour? It took me some time to figure out why future::plan(future::multisession) does not work since the documentation does not require future to be attached. I thought it was something wrong with my future.
Wouldn't it be better to check if the future::plan is future::sequential when future is loaded rather than to check if it is attached? It would be nice to have the option to run it in parallel without ever putting future onto the search path.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with R/model.R at lines 27-30 and 100, then reproduce the reported behavior using future::plan(future::multisession) without attaching future. Determine how the current attachment check controls parallelisation; done means a loaded, namespace-qualified future plan enables parallelisation without requiring future on the search path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100