You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Guillaume Charhon (JIRA)" <ji...@apache.org> on 2015/02/10 10:45:34 UTC
[jira] [Created] (SPARK-5713) Support python serialization for
RandomForest
Guillaume Charhon created SPARK-5713:
----------------------------------------
Summary: Support python serialization for RandomForest
Key: SPARK-5713
URL: https://issues.apache.org/jira/browse/SPARK-5713
Project: Spark
Issue Type: Improvement
Components: MLlib
Affects Versions: 1.2.0
Environment: Tested on MacOS
Reporter: Guillaume Charhon
I was trying to pickle a trained ramdom forest model. Unfortunately, it is impossible to serialize the model for future use.
model = RandomForest.trainRegressor(trainingData, categoricalFeaturesInfo={}, numTrees=nb_tree,featureSubsetStrategy="auto", impurity='variance', maxDepth=depth)
output = open('model.ml', 'wb')
pickle.dump(model,output)
I am getting this error:
TypeError: can't pickle lock objects
I am using Spark 1.2.0. I have also tested Spark 1.2.1
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org