Skip to content

Instantly share code, notes, and snippets.

@vene
Last active June 9, 2017 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vene/6f8bbdcd6e64a1fc99fc632d78e56183 to your computer and use it in GitHub Desktop.
Save vene/6f8bbdcd6e64a1fc99fc632d78e56183 to your computer and use it in GitHub Desktop.
lightning multiprocessing failure in python 3.6
import sys
import numpy as np
import sklearn
import lightning
print("python", sys.version)
print("numpy", np.__version__)
print("scikit-learn", sklearn.__version__)
print("lightning", lightning.__version__)
from sklearn.datasets import load_digits
from sklearn.model_selection import cross_val_score
from lightning.classification import CDClassifier
X, y = load_digits(return_X_y=True)
print("Fitting CDClassifier")
try:
CDClassifier(n_jobs=-1).fit(X, y)
print("succeeded")
except Exception as e:
print("failed", e)
print("running cross-val score")
try:
cross_val_score(CDClassifier(), X, y, n_jobs=-1)
print("succeeded")
except Exception as e:
print("failed", e)
python 3.5.3 |Continuum Analytics, Inc.| (default, Mar 6 2017, 11:58:13)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
numpy 1.12.1
scikit-learn 0.18.1
lightning 0.4.0
Fitting CDClassifier
succeeded
running cross-val score
succeeded
python 3.6.1 | packaged by conda-forge | (default, May 23 2017, 14:16:20)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)]
numpy 1.12.1
scikit-learn 0.18.1
lightning 0.4.0
Fitting CDClassifier
failed can't pickle lightning.impl.primal_cd_fast.SquaredHinge objects
running cross-val score
succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment