-
Notifications
You must be signed in to change notification settings - Fork 9
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
Problem forwarding batchtools resources to individual futures #75
Comments
Downgrading to |
Thanks @wlandau - I can confirm the behavior and that downgrading to |
Hi, this actually never meant to work, because You can argue that being able to specify "resources" should be part of the Future API. There is indeed a plan to work on this, cf. https://www.futureverse.org/roadmap.html. With such an API, it would make sense for a developer to specify certain "resources" that is requires in order to resolve a future. A somewhat hacky workaround would be to do something like the following in targets; the_plan <- plan("list")
strategy <- the_plan[[1]]
if (inherits(strategy, "batchtools_template")) {
strategy <- tweak(strategy, resources = resources)
the_plan[[1]] <- strategy
old_plan <- plan(the_plan)
on.exit(plan(old_plan), add = TRUE)
} This also highlight my point above. Imagine there's another HPC backend that names the corresponding argument, say, PS. We have the related problem that batchtools don't have a strict definition of what |
Thanks for explaining, Henrik. From my perspective as a user, it seemed safer to supply resources to the But I do understand the need for a consistent interface with appropriate semantic guardrails. |
Summary
When I supply a
resources
list to abatchtools
future, the resources seem to be ignored. I was alerted to this viatargets
, ropensci/targets#562 (comment) and ropensci/targets#632 (cc @wresch, @sdechaumet)Reproducible example
Using an SGE cluster with this template:
R console:
When I run
debug(BatchtoolsFuture)
on this example, I see thatresources = list(slots = 2)
is not actually passed to theBatchtoolsFuture()
function.BatchtoolsFuture()
appears to receive the defaultresources = list()
.Expected behavior
An SGE job with 2 slots should be submitted.
Session information
I am using the following commits of
future
andfuture.batchtools
:The text was updated successfully, but these errors were encountered: