-
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
setting the finalize option in tweak [options future.delete = FALSE] #37
Comments
I just had a look, and yes, using option future.batchtools/R/BatchtoolsFuture-class.R Lines 632 to 660 in ede01c2
The background for the About your attempt to configure the backend via the |
Thank you for the explanation! glad to hear the enhancements are in the works :) |
so the action to remove the contents is here in practice? which propagates to this https://github.com/mllg/batchtools/blob/3b0b1a9a59e377bb4d827e355d6955d66849c9e6/R/clearRegistry.R |
Correct, plus some tweaks of assertions following that. |
I've implemented this in the develop branch. After installing: remotes::install_github("HenrikBengtsson/future.batchtools@develop") The following now works: library(future.batchtools)
plan(batchtools_local)
options(future.delete = FALSE) ## <== DISABLE CLEANUP
f <- future(42)
v <- value(f)
print(f)
# BatchtoolsFuture:
# Label: '<none>'
# Expression:
# [1] 42
# Lazy evaluation: FALSE
# Asynchronous evaluation: TRUE
# Local evaluation: TRUE
# Environment: <environment: R_GlobalEnv>
# Capture standard output: TRUE
# Capture condition classes: 'message', 'warning'
# Globals: <none>
# Packages: <none>
# L'Ecuyer-CMRG RNG seed: <none>
# Resolved: TRUE
# Value: 56 bytes of class 'numeric'
# Early signalling: FALSE
# Owner process: a7e7b546-3d74-3d40-2c40-8de865c540e6
# Class: 'BatchtoolsFuture', 'Future', 'environment'
# batchtools cluster functions: 'Interactive'
# batchtools status: 'defined', 'finished', 'started', 'submitted'
# batchtools Registry:
# Job Registry
# Backend : Interactive
# File dir : /home/alice/.future/20190502_141813-obkGJW/batchtools_549386655
# Work dir : /home/alice
# Jobs : 1
# Seed : 9954
# Writeable: TRUE
# File dir exists: TRUE
# Work dir exists: TRUE
dir("/home/alice/.future/20190502_141813-obkGJW/batchtools_549386655")
# [1] "exports" "external" "jobs"
# [4] "logs" "more.args.rds" "registry.rds"
# [7] "results" "updates" "user.function.rds" |
Thank you! |
looking at the documentation of
batchtools_template
there is the dots argument which passesadditional arguments passed to BatchtoolsFuture()
. which in there there is a finalize argument whichIf TRUE, any underlying registries are deleted when this object is garbage collected, otherwise not.
I want to use this argument to keep future from removing the files after a call to a sungrid is complete.I have tried to use the options below, but can not toggle the garbage collection off.
if i try to set it in tweak i get the following warning, which makes sense too
where is the correct place to set this argument in the code?
The text was updated successfully, but these errors were encountered: