You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Mikael Ståldal (JIRA)" <ji...@apache.org> on 2016/11/04 10:01:11 UTC

[jira] [Created] (SPARK-18268) ALS.run fail with UnsupportedOperationException if run on an empty ratings RDD

Mikael Ståldal created SPARK-18268:
--------------------------------------

             Summary: ALS.run fail with UnsupportedOperationException if run on an empty ratings RDD
                 Key: SPARK-18268
                 URL: https://issues.apache.org/jira/browse/SPARK-18268
             Project: Spark
          Issue Type: Bug
          Components: MLlib
    Affects Versions: 2.0.1
            Reporter: Mikael Ståldal


{{ALS.run(RDD\[Rating\])}} fail with UnsupportedOperationException if run on an empty ratings RDD:

{code}
java.lang.UnsupportedOperationException: empty collection
	at org.apache.spark.rdd.RDD$$anonfun$first$1.apply(RDD.scala:1340) ~[spark-core_2.11-2.0.1.jar:2.0.1]
	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151) ~[spark-core_2.11-2.0.1.jar:2.0.1]
	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112) ~[spark-core_2.11-2.0.1.jar:2.0.1]
	at org.apache.spark.rdd.RDD.withScope(RDD.scala:358) ~[spark-core_2.11-2.0.1.jar:2.0.1]
	at org.apache.spark.rdd.RDD.first(RDD.scala:1337) ~[spark-core_2.11-2.0.1.jar:2.0.1]
	at org.apache.spark.mllib.recommendation.MatrixFactorizationModel.validateFeatures(MatrixFactorizationModel.scala:68) ~[spark-mllib_2.11-2.0.1.jar:2.0.1]
	at org.apache.spark.mllib.recommendation.MatrixFactorizationModel.<init>(MatrixFactorizationModel.scala:63) ~[spark-mllib_2.11-2.0.1.jar:2.0.1]
	at org.apache.spark.mllib.recommendation.ALS.run(ALS.scala:279) ~[spark-mllib_2.11-2.0.1.jar:2.0.1]
{code}

This also affects {{RDD.train}} and {{RDD.trainImplicit}}.



--
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