mlr-org / mlr-org/batchtools

addExperiments a second time works not like expected with combine = "bind"

Closed
#226 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
184
Forks
53
Avg merge
7d 2h
Merged PRs (30d)
1

Description

Look at the following example

library(batchtools)

reg = makeExperimentRegistry(file.dir = NA)

addProblem("names", data = list(), fun = function(name, ...) return(name))
pdes = list(names = data.frame(name = c("homer", "marge")))
addAlgorithm("combine", fun = function(job, data, instance, family) paste(instance, family, job$repl))
ades = list(combine = data.frame(family = "simpons"))
addExperiments(pdes, ades, repls = 2L)


pdes2 = list(names = data.frame(name = "ned"))
ades2 = list(combine = data.frame(family = "flanders"))
addExperiments(pdes2, ades2, repls = 2L, combine = "bind")

submitJobs()
reduceResultsList()

Now we have ned flanders 4 times. Instead I would expect it 2 times.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproducible example using addExperiments(..., combine = "bind"), then follow how the second experiment set is combined before submitJobs() and reduceResultsList(). Done means the second addExperiments call creates two ned/flanders results rather than four, while the first experiment set still behaves as shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.