Skip to content

Control/change number of tar_make_future workers mid-pipeline? #699

Closed Answered by wlandau
JakeRuss asked this question in Help
Discussion options

You must be logged in to vote

For this use case, I recommend running sections of the pipeline by themselves. Sketch:

tar_make_future(names = starts_with("before_data"), workers = 15)
tar_make_future(names = data, shortcut = TRUE, workers = 1)
tar_make_future(names = starts_with("after_data"), workers = 15, shortcut = TRUE)

Either that or you could change the dependency graph with the upstream targets pointing to the data and the downstream targets depending on the data. That would force the expensive data target to run by itself. For example, you could change this:

library(targets)
tar_script({
  list(
    tar_target(data, run_data()),
    tar_target(beginning, run_beginning()),
    tar_target(middle, run_middle(begi…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@JakeRuss
Comment options

Answer selected by JakeRuss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants