Github user catmonkeylee commented on the pull request:

    https://github.com/apache/spark/pull/4854#issuecomment-84084520
  
    When I run the sample code in cluster mode, there is an error.
    
    Traceback (most recent call last):
      File "/data1/s/apps/spark-app/app/sample_rf.py", line 25, in <module>
        sameModel = RandomForestModel.load(sc, _model_path)
      File "/home/s/apps/spark/python/pyspark/mllib/util.py", line 254, in load
        java_model = cls._load_java(sc, path)
      File "/home/s/apps/spark/python/pyspark/mllib/util.py", line 250, in 
_load_java
        return java_obj.load(sc._jsc.sc(), path)
      File 
"/home/s/apps/spark/python/lib/py4j-0.8.2.1-src.zip/py4j/java_gateway.py", line 
538, in __call__
      File 
"/home/s/apps/spark/python/lib/py4j-0.8.2.1-src.zip/py4j/protocol.py", line 
300, in get_return_value
    py4j.protocol.Py4JJavaError: An error occurred while calling 
z:org.apache.spark.mllib.tree.model.RandomForestModel.load.
    : java.lang.UnsupportedOperationException: empty collection
        at org.apache.spark.rdd.RDD.first(RDD.scala:1191)
        at 
org.apache.spark.mllib.util.Loader$.loadMetadata(modelSaveLoad.scala:125)
        at 
org.apache.spark.mllib.tree.model.RandomForestModel$.load(treeEnsembleModels.scala:65)
        at 
org.apache.spark.mllib.tree.model.RandomForestModel.load(treeEnsembleModels.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to