Comments (6)
I just had a look, and yes, using option future.delete = FALSE
will only skip the deletion of the batchtools registry if there's a failure. If there's no failure, then the registry (folder) is always removed:
future.batchtools/R/BatchtoolsFuture-class.R
Lines 632 to 660 in ede01c2
The background for the future.delete
option here was for troubleshooting purposes of failed futures/jobs; I never considered the need to keep it otherwise. Shouldn't be hard to add support for this though, so it's now on the todo list.
About your attempt to configure the backend via the plan()
function: This is a direction the Future API is moving toward. This far the focus has been on the "frontend" (what future()
, value()
, ... should support), but more and more use cases show that there is need to better control backend-specific properties. This is in line with where the future package is heading/aiming, cf. HenrikBengtsson/future#172
from future.batchtools.
Thank you for the explanation! glad to hear the enhancements are in the works :)
from future.batchtools.
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
from future.batchtools.
Correct, plus some tweaks of assertions following that.
from future.batchtools.
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"
from future.batchtools.
Thank you!
from future.batchtools.
Related Issues (20)
- huge results file with 'conditions' - performance bottleneck HOT 4
- use batchtools directly for scheduling
- Eqw on SGE cluster while R code finishes without error
- Simple chunking with nested parallelism HOT 1
- Slurm readLog() Error - Option to change fs.latency & scheduler.latency from batchtools_slurm or future::tweak HOT 10
- Proposed bugfix for batchtools reveals bug in future.batchtools? HOT 4
- Problem forwarding batchtools resources to individual futures HOT 4
- problem with running example parallel futures using batchtools_lsf
- Add batchtools template for SGE
- batchtools templates: `resources[["asis"]]` for as-is declarations HOT 1
- print() for BatchtoolsFuture should report on the template file used HOT 1
- Compatibility with promises package HOT 2
- TESTS: Error: identical(Sys.getenv(), oenvs0) is not TRUE on MS Windows CRAN HOT 1
- run(), resolved()[?], and result(): the RNG state is updated - from where? HOT 3
- Add support for plan(batchtools_multicore, workers = I(1))
- All batchtools_nnn() functions should return the future invisibly
- Template tools: add option to ShellCheck rendered template
- Template tools: export functions to find and render template
- PERFORMANCE: status() to memoize "finalized" state? HOT 2
- Error: Log file for job with id 1 not available HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from future.batchtools.