2

I'm running a mlr benchmark with multiple learners (around 15 different learners) with nested resampling using the irace tuning control. My question is: is it possible to run two parallelization levels on parallelMap?

If I use the mlr.benchmark level, the faster learners end firsts and only the more computational demanding learners remain running, a single thread for each. So end up with 4 maybe 5 threads running.

If I use the mlr.tuneParams level, the irace tuning control spawns 6 threads evaluates all of them and then after all of them finish, it creates 6 others. I know that this method is sequential in nature.

My point is either way the CPU cores are not fully used. For example if a CPU has 12 cores I could run two learners at same time with each learner using 6 cores for tuning.

Right now I'm doing this manually: I create multiple R sessions and run them separately.

Thanks!

  • All levels should be parallelized by default without you having to specify them. What are you doing to enable the parallelization at the moment? – Lars Kotthoff Jun 26 '19 at 01:25

1 Answers1

2

You cannot parallelize across multiple levels currently with parallelMap. The level argument of parallelMap::parallelStart() only accepts a single level.

This is a known limitation and probably won't change anymore in the future. In mlr3 all levels will be parallelized using the future package.

If you have nested calls to parallelMap() in your code without setting an explicit level, the first call in the pipeline will be parallelized.

pat-s
  • 5,992
  • 1
  • 32
  • 60