-
- Downloads
[SPARK-21723][ML] Fix writing LibSVM (key not found: numFeatures)
## What changes were proposed in this pull request? Check the option "numFeatures" only when reading LibSVM, not when writing. When writing, Spark was raising an exception. After the change it will ignore the option completely. liancheng HyukjinKwon (Maybe the usage should be forbidden when writing, in a major version change?). ## How was this patch tested? Manual test, that loading and writing LibSVM files work fine, both with and without the numFeatures option. Please review http://spark.apache.org/contributing.html before opening a pull request. Author: Jan Vrsovsky <jan.vrsovsky@firma.seznam.cz> Closes #18872 from ProtD/master.
Showing
- mllib/src/main/scala/org/apache/spark/ml/source/libsvm/LibSVMRelation.scala 4 additions, 4 deletions...la/org/apache/spark/ml/source/libsvm/LibSVMRelation.scala
- mllib/src/test/scala/org/apache/spark/ml/source/libsvm/LibSVMRelationSuite.scala 30 additions, 6 deletions...g/apache/spark/ml/source/libsvm/LibSVMRelationSuite.scala
Please register or sign in to comment