What is the right way to save\load models in Spark\PySpark

后端 未结 4 1607
一向
一向 2021-02-04 08:11

I\'m working with Spark 1.3.0 using PySpark and MLlib and I need to save and load my models. I use code like this (taken from the official documentation )

from p         


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-04 08:22

    As of this pull request merged on Mar 28, 2015 (a day after your question was last edited) this issue has been resolved.

    You just need to clone/fetch the latest version from GitHub (git clone git://github.com/apache/spark.git -b branch-1.3) then build it (following the instructions in spark/README.md) with $ mvn -DskipTests clean package.

    Note: I ran into trouble building Spark because Maven was being wonky. I resolved that issue by using $ update-alternatives --config mvn and selecting the 'path' that had Priority: 150, whatever that means. Explanation here.

提交回复
热议问题