java.lang.IllegalArgumentException: Unsupported type org.apache.spark.mllib.linalg.VectorUDT@5172cce4

JIRA | Peter Rudenko | 2 years ago
  1. 0

    Steps to reproduce: Follow [new spark ml api guide|http://spark.apache.org/docs/latest/ml-guide.html]: {code} val training = sparkContext.parallelize(Seq( LabeledDocument(0L, "a b c d e spark", 1.0), LabeledDocument(1L, "b d", 0.0), LabeledDocument(2L, "spark f g h", 1.0), LabeledDocument(3L, "hadoop mapreduce", 0.0))) // Configure an ML pipeline, which consists of three stages: tokenizer, hashingTF, and lr. val tokenizer = new Tokenizer() .setInputCol("text") .setOutputCol("words") val hashingTF = new HashingTF() .setNumFeatures(1000) .setInputCol(tokenizer.getOutputCol) .setOutputCol("features") val pipeline = new Pipeline().setStages(Array(tokenizer, hashingTF)) val model = pipeline.fit(training) val tranformed = model.transform(training) scala> transformed.schema res7: org.apache.spark.sql.StructType = StructType(ArrayBuffer(StructField(id,LongType,false), StructField(text,StringType,true), StructField(label,DoubleType,false), StructField(words,ArrayType(StringType,false),true), StructField(features,org.apache.spark.mllib.linalg.VectorUDT@5172cce4,true))) scala> toDataFrame(transformed) java.lang.IllegalArgumentException: Unsupported type ArrayType(StringType,false) at org.apache.spark.h2o.H2OContextUtils$.dataTypeToClass(H2OContextUtils.scala:175) at org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282) at org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) at scala.collection.TraversableLike$class.map(TraversableLike.scala:244) val transformed2 = transformed.select('features) scala> transformed2.schema res4: org.apache.spark.sql.StructType = StructType(ArrayBuffer(StructField(features,org.apache.spark.mllib.linalg.VectorUDT@5172cce4,true))) scala> toDataFrame(transformed2) java.lang.IllegalArgumentException: Unsupported type org.apache.spark.mllib.linalg.VectorUDT@5172cce4 at org.apache.spark.h2o.H2OContextUtils$.dataTypeToClass(H2OContextUtils.scala:175) at org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282) at org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) {code}

    JIRA | 2 years ago | Peter Rudenko
    java.lang.IllegalArgumentException: Unsupported type org.apache.spark.mllib.linalg.VectorUDT@5172cce4
  2. 0

    Steps to reproduce: Follow [new spark ml api guide|http://spark.apache.org/docs/latest/ml-guide.html]: {code} val training = sparkContext.parallelize(Seq( LabeledDocument(0L, "a b c d e spark", 1.0), LabeledDocument(1L, "b d", 0.0), LabeledDocument(2L, "spark f g h", 1.0), LabeledDocument(3L, "hadoop mapreduce", 0.0))) // Configure an ML pipeline, which consists of three stages: tokenizer, hashingTF, and lr. val tokenizer = new Tokenizer() .setInputCol("text") .setOutputCol("words") val hashingTF = new HashingTF() .setNumFeatures(1000) .setInputCol(tokenizer.getOutputCol) .setOutputCol("features") val pipeline = new Pipeline().setStages(Array(tokenizer, hashingTF)) val model = pipeline.fit(training) val tranformed = model.transform(training) scala> transformed.schema res7: org.apache.spark.sql.StructType = StructType(ArrayBuffer(StructField(id,LongType,false), StructField(text,StringType,true), StructField(label,DoubleType,false), StructField(words,ArrayType(StringType,false),true), StructField(features,org.apache.spark.mllib.linalg.VectorUDT@5172cce4,true))) scala> toDataFrame(transformed) java.lang.IllegalArgumentException: Unsupported type ArrayType(StringType,false) at org.apache.spark.h2o.H2OContextUtils$.dataTypeToClass(H2OContextUtils.scala:175) at org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282) at org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) at scala.collection.TraversableLike$class.map(TraversableLike.scala:244) val transformed2 = transformed.select('features) scala> transformed2.schema res4: org.apache.spark.sql.StructType = StructType(ArrayBuffer(StructField(features,org.apache.spark.mllib.linalg.VectorUDT@5172cce4,true))) scala> toDataFrame(transformed2) java.lang.IllegalArgumentException: Unsupported type org.apache.spark.mllib.linalg.VectorUDT@5172cce4 at org.apache.spark.h2o.H2OContextUtils$.dataTypeToClass(H2OContextUtils.scala:175) at org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282) at org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) {code}

    JIRA | 2 years ago | Peter Rudenko
    java.lang.IllegalArgumentException: Unsupported type org.apache.spark.mllib.linalg.VectorUDT@5172cce4
  3. 0

    Apache Spark User List - Issue with running CrossValidator with RandomForestClassifier on dataset

    nabble.com | 1 year ago
    java.lang.IllegalArgumentException: requirement failed: Column rawPrediction must be of type org.apache.spark.mllib.linalg.VectorUDT@1eef but was actually DoubleType.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Deeplearning4j to spark pipeline: Convert a String type to org.apache.spark.mllib.linalg.VectorUDT

    Stack Overflow | 10 months ago | Thamali Wijewardhana
    java.lang.IllegalArgumentException: requirement failed: Column Review must be of type org.apache.spark.mllib.linalg.VectorUDT@f71b0bce but was actually StringType.
  6. 0

    Failure when running TitanIndexRepair on 0.5.4

    GitHub | 2 years ago | Airswoop1
    java.lang.Exception: java.io.IOException: Unknown exception while executing index operation

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Unsupported type org.apache.spark.mllib.linalg.VectorUDT@5172cce4

      at org.apache.spark.h2o.H2OContextUtils$.dataTypeToClass()
    2. org.apache.spark
      H2OContext$$anonfun$4.apply
      1. org.apache.spark.h2o.H2OContextUtils$.dataTypeToClass(H2OContextUtils.scala:175)
      2. org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282)
      3. org.apache.spark.h2o.H2OContext$$anonfun$4.apply(H2OContext.scala:282)
      3 frames
    3. Scala
      ArrayBuffer.foreach
      1. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      2. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      3. scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
      4. scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
      4 frames