Skip to content

CV freeze on MacOS due to parallel::makeCluster() issue in gbmCluster() #53

@albertbuchard

Description

@albertbuchard

Hi, there is a new issue with parallell:makeCluster() that apparently only affects new version of R on MacOS. (see here)

It causes gbm to freeze when using CV. A quick fix is to pass setup_strategy="sequential" to makeCluster in gbmCluster().

Add in your code before calling gbm:

gbmCluster = function (n) 
{
  if (is.null(n)) {
    n <- parallel::detectCores()
  }
  parallel::makeCluster(n, setup_strategy = "sequential")
}

assignInNamespace("gbmCluster", gbmCluster, ns="gbm")

Hope it is useful to someone ! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions