harrysouthworth / gbm

Gradient boosted models
Other
106 stars 27 forks source link

Restore automatic multicore detection for CV #4

Closed jiho closed 10 years ago

jiho commented 10 years ago

When n.cores is NULL, gbmCluster() detects multiple core automatically and creates a cluster when appropriate. The code introduced in commit 9519046fe3bb49ad44dc to fix an issue with cluster detection checks n.cores directly instead of checking the output of gbmCluster(). So what was automatically parallelised before isn't anymore.

The current code checks the output of gbmCluster and still uses the
non-parallel lapply() on machines with only one core.