-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrectly up-to-date dynamic targets #1260
Comments
6fb84de is a preemptive patch to
@richardbayes, let's try 6fb84de and see if the problem goes away. |
Turns out I misjudged the cause of the problem. Here is a reprex from @richardbayes, and it has nothing to do with HPC. library(drake)
my_fun <- function(x) x
plan <- drake_plan(
x = seq_len(5),
y = target(my_fun(x), dynamic = map(x))
)
make(plan)
#> ▶ target x
#> ▶ dynamic y
#> > subtarget y_0b3474bd
#> > subtarget y_b2a5c9b8
#> > subtarget y_71f311ad
#> > subtarget y_98cf3c11
#> > subtarget y_0a86c9cb
#> ■ finalize y
readd(y)
#> [1] 1 2 3 4 5
my_fun <- function(x) x ^ 2
plan <- drake_plan(
x = seq_len(3),
y = target(my_fun(x), dynamic = map(x))
)
make(plan)
#> ▶ target x
#> ▶ dynamic y
#> > subtarget y_0b3474bd
#> > subtarget y_b2a5c9b8
#> > subtarget y_71f311ad
#> ■ finalize y
readd(y)
#> [1] 1 4 9
plan <- drake_plan(
x = seq_len(5),
y = target(my_fun(x), dynamic = map(x))
)
make(plan)
#> ▶ target x
#> ■ finalize y
readd(y)
#> [1] 1 4 9 4 5 Created on 2020-05-22 by the reprex package (v0.3.0) |
I think we have to explicitly invalidate old unused sub-targets when we finalize a dynamic target. I was avoiding this because I thought it would be slow, but finalization does not actually take very long. |
Prework
drake
's code of conduct.remotes::install_github("ropensci/drake")
) and mention the SHA-1 hash of the Git commit you install.Description
Under some circumstances, dynamic targets incorrectly show as up-to-date. This bug is unpredictable and extremely difficult to reproduce, but some of the surrounding circumstances seem to be:
make()
.make()
s usecaching = "worker"
with a parallel backend on a cluster.make()
s are interrupted, either by abruptly terminating the workers (e.g.qdel
orscancel
) or abruptly terminating the master (e.g.kill -9 ...
) or both.cc @richardbayes
The text was updated successfully, but these errors were encountered: