title: spark-sklearn, module object has not attribute '_fit_and_score'
body: <p>I'm experimenting with spark-sklearn and have the following code:</p>
  
  <pre><code>import os
  import sys
  
  # Path for spark source folder
  os.environ['SPARK_HOME']="[spark folder location]"
  
  # Append pyspark  to Python Path
  sys.path.append("[spark's python folder location]")
  
  from pyspark import SparkContext
  
  sc = SparkContext()
  
  from sklearn import svm, grid_search, datasets
  from spark_sklearn import GridSearchCV
  
  iris = datasets.load_iris()
  parameters = {'kernel':('linear', 'rbf'), 'C':[1, 10]}
  svr = svm.SVC()
  clf = GridSearchCV(sc, svr, parameters)
  clf.fit(iris.data, iris.target)
  </code></pre>
  
  <p>And this results in the following error:</p>
  
  <pre><code>Caused by: org.apache.spark.api.python.PythonException: Traceback (most recent call last):
  File "[spark's python folder location]/lib/pyspark.zip/pyspark/worker.py", line 98, in main
  command = pickleSer._read_with_length(infile)
  File "[spark's python folder location]/lib/pyspark.zip/pyspark/serializers.py", line 164, in _read_with_length
  return self.loads(obj)
  File "[spark's python folder location]/python/lib/pyspark.zip/pyspark/serializers.py", line 422, in loads
  return pickle.loads(obj)
  AttributeError: 'module' object has no attribute '_fit_and_score'
  
  at org.apache.spark.api.python.PythonRunner$$anon$1.read(PythonRDD.scala:166)
  at org.apache.spark.api.python.PythonRunner$$anon$1.&lt;init&gt; (PythonRDD.scala:207)
  at org.apache.spark.api.python.PythonRunner.compute(PythonRDD.scala:125)
  at org.apache.spark.api.python.PythonRDD.compute(PythonRDD.scala:70)
  at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:306)
  at org.apache.spark.rdd.RDD.iterator(RDD.scala:270)
  at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
  at org.apache.spark.scheduler.Task.run(Task.scala:89)
  at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:213)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  ... 1 more
  
  16/02/26 09:35:53 INFO Executor: Executor killed task 5.0 in stage 0.0 (TID 5)
  16/02/26 09:35:53 WARN TaskSetManager: Lost task 5.0 in stage 0.0 (TID 5, localhost): TaskKilled (killed intentionally)
  16/02/26 09:35:53 INFO TaskSetManager: Lost task 1.0 in stage 0.0 (TID 1) on executor localhost: org.apache.spark.api.python.PythonException (Traceback (most recent call last):
  File "[spark's python folder location]/lib/pyspark.zip/pyspark/worker.py", line 98, in main
  command = pickleSer._read_with_length(infile)
  File "[spark's python folder location]/lib/pyspark.zip/pyspark/serializers.py", line 164, in _read_with_length
  return self.loads(obj)
  File "[spark's python folder location]/lib/pyspark.zip/pyspark/serializers.py", line 422, in loads
  return pickle.loads(obj)
  AttributeError: 'module' object has no attribute '_fit_and_score') 
  </code></pre>
  
  <p>I'm running ubuntu 14.04. I have spark-sklearn, and sklearn on my python path, and have installed python-sklearn via the ubuntu repositories. Spark 1.6 standalone works and I have called "pure" spark methods with success in python scripts.</p>
  
  <p>Any help would be greatly appreciated. Spark-sklearn is fairly new so there's not a ton of information out.</p>
  
  <p>Thanks</p>