You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm that your issue is a genuine bug in the crew.cluster package itself and not a user error, known limitation, or issue from another package that crew.cluster depends on.
If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
When running a targets pipeline with a Slurm controller, an error gets thrown after the pipeline finishes. It doesn't prevent the pipeline from running all the way through if the pipeline is in fact clean, but it does trigger the tar_make() pipeline error reporting code after reporting "ended pipeline". It looks like a data.frame() error thrown when targets calls crew_summary() on the Slurm controller after finishing the pipeline. Maybe something to do with new expected arguments (or newly deprecated ones) for crew_controller_slurm()?
Most of the time, I'm okay with ignoring the error because the pipeline has actually worked. Occasionally, though, my pipeline does actually throw a real error that I need to debug. In those cases, the crew_summary() error is still technically the last error thrown by the pipeline, and so THAT'S the error captured and reported in tar_meta(). In order to actually capture the target error, I then have to re-run without using crew with tar_make(use_crew=FALSE) so that the last error thrown by the pipeline is the target error.
thank you for your help!
Reproducible example
Post a minimal reproducible example so the maintainer can troubleshoot the problems you identify. A reproducible example is:
Runnable: post enough R code and data so any onlooker can create the error on their own computer.
Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
-
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
tar_source(): these files do not exist: R
▶ dispatched target test_target
Submitted batch job 76395
● completed target test_target [0.018 seconds, 176 bytes]
▶ ended pipeline [7.959 seconds]
Warning messages:
1: seconds_interval was deprecated on 2025-01-17 (version 0.10.2.9003). Alternative: none (no longer used).
2: seconds_interval was deprecated on 2025-01-17 (version 0.10.2.9003). Alternative: none (no longer used).
3: seconds_interval was deprecated on 2025-01-17 (version 0.10.2.9003). Alternative: none (no longer used).
4: seconds_interval was deprecated on 2025-01-17 (version 0.10.2.9003). Alternative: none (no longer used).
5: seconds_interval was deprecated on 2025-01-17 (version 0.10.2.9003). Alternative: none (no longer used).
6: seconds_interval was deprecated on 2025-01-17 (version 0.10.2.9003). Alternative: none (no longer used).
7: seconds_interval was deprecated on 2025-01-17 (version 0.10.2.9003). Alternative: none (no longer used).
8: seconds_interval was deprecated on 2025-01-17 (version 0.10.2.9003). Alternative: none (no longer used).
9: seconds_interval was deprecated on 2025-01-17 (version 0.10.2.9003). Alternative: none (no longer used).
10: Unknown or uninitialised column: `worker`.
Error:
! targets::tar_make() error
── Debugging ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• tar_errored()
• tar_meta(fields = any_of("error"), complete_only = TRUE)
• tar_workspace()
• tar_workspaces()
── How to ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• Debug: https://books.ropensci.org/targets/debugging.html
• Help: https://books.ropensci.org/targets/help.html
── Last error message ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
arguments imply differing number of rows: 1, 0
── Last error traceback ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
base::tryCatch(base::withCallingHandlers({ NULL base::saveRDS(base::do.c...
tryCatchList(expr, classes, parentenv, handlers)
tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), na...
doTryCatch(return(expr), name, parentenv, handler)
tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
tryCatchOne(expr, names, parentenv, handlers[[1L]])
doTryCatch(return(expr), name, parentenv, handler)
base::withCallingHandlers({ NULL base::saveRDS(base::do.call(base::do.ca...
base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/tmp/R...
base::do.call(base::do.call, base::c(base::readRDS("/tmp/RtmptJZ1uy/call...
(function (what, args, quote = FALSE, envir = parent.frame()) { if (!is....
(function (targets_function, targets_arguments, options, envir = NULL, s...
tryCatch(out <- withCallingHandlers(targets::tar_callr_inner_try(targets...
tryCatchList(expr, classes, parentenv, handlers)
tryCatchOne(expr, names, parentenv, handlers[[1L]])
doTryCatch(return(expr), name, parentenv, handler)
withCallingHandlers(targets::tar_callr_inner_try(targets_function = targ...
targets::tar_callr_inner_try(targets_function = targets_function, target...
do.call(targets_function, targets_arguments)
(function (pipeline, path_store, names_quosure, shortcut, reporter, seco...
crew_init(pipeline = pipeline, meta = meta_init(path_store = path_store)...
self$run_crew()
self$finalize_crew()
crew_summary(self$controller)
data_frame(controller = summary$controller, worker = summary$worker, sec...
data.frame(..., stringsAsFactors = FALSE)
stop(gettextf("arguments imply differing number of rows: %s", paste(uniq...
Expected result
Ideally, this error would not throw! I have confirmed that running the same pipeline using tar_make(use_crew=FALSE) runs the pipeline and doesn't throw this issue, so it's not pipeline-related. I have also reproduced this error on my machine (Ubuntu server) in multiple targets pipelines.
The infrastructure of crew and targets changed a lot recently, and not all versions are mutually compatible. Would you please try again with the latest releases?
Prework
crew.cluster
package itself and not a user error, known limitation, or issue from another package thatcrew.cluster
depends on.Description
When running a targets pipeline with a Slurm controller, an error gets thrown after the pipeline finishes. It doesn't prevent the pipeline from running all the way through if the pipeline is in fact clean, but it does trigger the
tar_make()
pipeline error reporting code after reporting "ended pipeline". It looks like adata.frame()
error thrown when targets callscrew_summary()
on the Slurm controller after finishing the pipeline. Maybe something to do with new expected arguments (or newly deprecated ones) forcrew_controller_slurm()
?Most of the time, I'm okay with ignoring the error because the pipeline has actually worked. Occasionally, though, my pipeline does actually throw a real error that I need to debug. In those cases, the
crew_summary()
error is still technically the last error thrown by the pipeline, and so THAT'S the error captured and reported intar_meta()
. In order to actually capture the target error, I then have to re-run without using crew withtar_make(use_crew=FALSE)
so that the last error thrown by the pipeline is the target error.thank you for your help!
Reproducible example
Targets script below. Note that some of the Slurm parameters are specific to our own cluster, like the account and partition names.
tar_make() call, using the SLURM controller:
tar_make() output below
Expected result
Ideally, this error would not throw! I have confirmed that running the same pipeline using
tar_make(use_crew=FALSE)
runs the pipeline and doesn't throw this issue, so it's not pipeline-related. I have also reproduced this error on my machine (Ubuntu server) in multiple targets pipelines.Diagnostic information
sessionInfo()
orreprex(si = TRUE)
.traceback()
orrlang::trace_back()
.crew.cluster
currently installed.packageDescription("crew.cluster")$GithubSHA1
shows you this.Session info:
The text was updated successfully, but these errors were encountered: