Skip to content
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

retrieve future expression on local machine #21

Open
marcosci opened this issue May 4, 2018 · 1 comment
Open

retrieve future expression on local machine #21

marcosci opened this issue May 4, 2018 · 1 comment

Comments

@marcosci
Copy link

marcosci commented May 4, 2018

Hi Henrik,

maybe that's utterly basic and the wrong place to ask, but I thought it might be of interest for more people:

Is there a way you can retrieve a future expressions in the following setup:

login <- tweak(remote, workers = "remote@remote")
bsub <- tweak(batchtools_lsf, ...)
plan(list(
    login,
    bsub,
    multiprocess
))

and I submit the following job (just an example):

y %<-% furrr::future_map_dfr(1:5, function(x){
    cores <- availableCores()
    furrr::future_map_dfr(1:5, function(x){
        tibble::tibble(x = x, 
                       nodename = Sys.info()['nodename'],
                       Sys.getpid = Sys.getpid(), 
                       availableCores = cores) 
    })
}) 

... let's imagine this takes an considerable amount of time and I would close my local r session in between submitting the job and its being finished.

After a login then (and rerunning the same plan again) I can't access y, neither can I access y on the remote machine in an R session. Is that possible in general?

If not, we wondered if you can save R objects somehow in an future_apply, submitted from a local machine and evaluated an a remote one?

Sorry for the very basic questions, just started to fiddle around with future.batchtools.

Cheers
Marco

@HenrikBengtsson
Copy link
Owner

No worries, this is certainly a valid question / feature request.

Unfortunately, saving future objects to file and reviving them later is currently not supported - neither at the core level (the future package) nor at the future.batchtools backend. This is something that will only be possible for some future backends, and therefore will only be available as an optional feature to the Future API.

I believe this has been asked before regarding the batchtools package, but I forgot what the status is. If anyone remembers/got points, please share here. As a starter, in order to add support for this in future.batchtools, it needs to be supported by batchtools itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants