From 01263983cf348b0bf504575d159624f7d879315b Mon Sep 17 00:00:00 2001 From: guoci Date: Tue, 7 Dec 2021 16:32:29 -0500 Subject: [PATCH] workaround `loky` issue https://github.com/joblib/loky/issues/192 --- easypqp/library.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easypqp/library.py b/easypqp/library.py index 9b6ba3a..7f1dbf9 100644 --- a/easypqp/library.py +++ b/easypqp/library.py @@ -211,11 +211,10 @@ def predict(self, x): def __repr__(self): return str(self.get_params()) - def lowess_iso_predictor(filename, x, y, xpred): gsc = sklearn.model_selection.GridSearchCV(LowessIsoEstimator(None), {'lowess_frac': [0.01, 0.02, 0.04, 0.08]}, cv=sklearn.model_selection.KFold(4, shuffle=True, random_state=0), - n_jobs=-1) + n_jobs=min(os.cpu_count(), 61)) gsc.fit(x.reshape(-1, 1), y) click.echo(f'Info: {filename}; Lowess fraction used: {gsc.best_params_["lowess_frac"]}.')