Skip to content

GridSearchCV processes hang with n_jobs = -1 #3605

Closed
@mkneierV

Description

@mkneierV

I am working with a ~5M by 300k sparse (CSR) matrix, and want to run a GridSearchCV for the regularization parameter C of a l1 penalized logistic regression. When running the grid search, the processes are spawned, but then hang indefinitely, and the search never completes (or begins, for that matter).

Here is my code:

param_grid = {'C': [x * .1 for x in range(2, 8)]}
lr_model = LogisticRegression(penalty='l1', fit_intercept=False)
logit_model = GridSearchCV(lr_model,
                                                param_grid,
                                                scoring=calibration_score,
                                                cv=3
                                               n_jobs=-1,
                                               verbose=True)

logit_model.fit(design_matrix, response)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions