futureverse / futureverse/future

plan for OpenMP?

Open
#388 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
R
Stars
1k
Forks
92
PR merge metrics
No merged PRs in 30d

Description

In mlr3, we are looping over the folds of a cross validation with `future.apply`. In each iteration, we are calling a function from an external library to fit a model. Many of the external libraries come with support for OpenMP, e.g. `ranger` or `xgboost`.

I was wondering if we could exploit the future API to set the number of OpenMP threads, e.g. via environment variable OMP_NUM_THREADS.

As an alternative, it would probably be sufficient for us if we could create a custom plan to store the number of workers to be used by the learners. We could then query the number of workers again and map it to the respective argument of the learner function. Is this already possible?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.