Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-33423

DoubleParam can't parse a JSON number without decimal places

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.4.6
    • Fix Version/s: None
    • Component/s: MLlib
    • Labels:
      None

      Description

      new DoubleParam("", "", "").jsonDecode("1")

       

      throws an following exception (see below). It would be great if it could make a double from a JInt (trivial)

       

       java.lang.IllegalArgumentException: Cannot decode JInt(1) to Double.
      at org.apache.spark.ml.param.DoubleParam$.jValueDecode(params.scala:380)
      at org.apache.spark.ml.param.DoubleParam.jsonDecode(params.scala:349)
      at org.apache.spark.ml.param.DoubleParam.jsonDecode(params.scala:330)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alexnb Alexander Bouriakov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: