delayed, Parallel only py3
@@ -7,7 +7,6 @@ import numpy as np
import scipy as sp
from wandb.sklearn.utils import *
from sklearn.base import clone
-from joblib import Parallel, delayed
from sklearn import model_selection
from sklearn import datasets
from sklearn import metrics
@@ -557,6 +556,11 @@ def plot_elbow_curve(clusterer=None, X=None, cluster_ranges=None, n_jobs=1,
Example:
wandb.sklearn.plot_elbow_curve(model, X_train)
"""
+ try:
+ from joblib import Parallel, delayed
+ except ImportError:
+ wandb.termerror("plot_elbow_curve requires python 3x")
+ return
if not hasattr(clusterer, 'n_clusters'):
wandb.termlog('n_clusters attribute not in classifier. Cannot plot elbow method.')
return
