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

BUG: Variables starting with a period are exported but not imported #87

Closed
HenrikBengtsson opened this issue Feb 11, 2017 · 1 comment
Closed

Comments

@HenrikBengtsson
Copy link

HenrikBengtsson commented Feb 11, 2017

Variables starting with a period are exported but not imported.

Example

library("batchtools")
reg <- makeRegistry(NA)
objs <- list(a = 1, b = 2, .c = 3, d = 4)
str(objs)
batchExport(export = objs, reg = reg)
dir(file.path(reg$file.dir, "exports"), all.files = TRUE, full.names = TRUE)

batchMap(fun = function(i) {
    list(i = i, a = a, b = b, .c = .c, d = d)
}, i = 1L, reg = reg)

submitJobs(reg = reg)

ans <- waitForJobs(reg = reg)
stopifnot(isTRUE(ans))

y <- reduceResultsList(reg = reg)
str(y)

results in:

❯ getErrorMessages(reg = reg)
   job.id terminated error                                         message
1:      1       TRUE  TRUE Error in (function (i)  : object '.c' not found

Troubleshooting

This seems to be because loadRegistryDependencies() does not use all.names = TRUE in:

  path = file.path(x$file.dir, "exports")
  fns = list.files(path, pattern = "\\.rds$")

See also

BatchJobs had the exact same problem; tudo-r/BatchJobs#103

@mllg
Copy link
Owner

mllg commented Feb 15, 2017

I now use base32 encoded file names for exports which should fix this. I will do the same thing for other user provided file names to make this consistent (i.e., problems and algorithms).

@mllg mllg closed this as completed Feb 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants