Uploaded image for project: 'SystemDS'
  1. SystemDS
  2. SYSTEMDS-1222

MLContext `read` Statement Value Input Error For `cols_in_block` Argument

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • SystemML 0.13
    • None
    • None

    Description

      The read statement has optional numeric parameters, such as cols_in_block that expect integers. If a Scala Long is supplied as an input variable for one of those parameters via MLContext, and type error will occur in which an Int was expected, but a Long was received. A quick fix is to convert to an integer with Long.toInt before passing the value into the script via MLContext.

      We should automatically cast Long to Int internally.

      Attachments

        Activity

          cc deron

          dusenberrymw Mike Dusenberry added a comment - cc deron

          Since Long is not a recognized SystemML value type, it makes sense to do the long to int conversion high up in the API.

          Value types in SystemML (from Statement.java):

          	public static final String DOUBLE_VALUE_TYPE = "double";
          	public static final String BOOLEAN_VALUE_TYPE = "boolean";
          	public static final String INT_VALUE_TYPE = "int";
          	public static final String STRING_VALUE_TYPE = "string";
          

          Thank for finding this mwdusenb@us.ibm.com.

          https://github.com/apache/incubator-systemml/pull/370 addresses this.

          deron Jon Deron Eriksson added a comment - Since Long is not a recognized SystemML value type, it makes sense to do the long to int conversion high up in the API. Value types in SystemML (from Statement.java): public static final String DOUBLE_VALUE_TYPE = " double " ; public static final String BOOLEAN_VALUE_TYPE = " boolean " ; public static final String INT_VALUE_TYPE = " int " ; public static final String STRING_VALUE_TYPE = "string" ; Thank for finding this mwdusenb@us.ibm.com . https://github.com/apache/incubator-systemml/pull/370 addresses this.

          Fixed by PR370.

          deron Jon Deron Eriksson added a comment - Fixed by PR370 .

          People

            deron Jon Deron Eriksson
            dusenberrymw Mike Dusenberry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: