You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Matthias Boehm (JIRA)" <ji...@apache.org> on 2016/02/17 09:21:18 UTC

[jira] [Comment Edited] (SYSTEMML-526) Allow read iofilename to be non-constant value

    [ https://issues.apache.org/jira/browse/SYSTEMML-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15150095#comment-15150095 ] 

Matthias Boehm edited comment on SYSTEMML-526 at 2/17/16 8:21 AM:
------------------------------------------------------------------

yes this would be a useful feature - currently we only support in-memory udfs for that matter (org.apache.sysml.udf.lib.DynamicReadMatrixCP). 

The reason why this is challenging is because we compile data types and other meta data into our runtime programs (not just sizes) - dynamic recompilation could handle changing sizes but not for example to read a mix of matrices and scalars.  


was (Author: mboehm7):
yes this would be a useful feature - currently we only support in-memory udfs for that matter (org.apache.sysml.udf.lib.DynamicReadMatrixCP).

> Allow read iofilename to be non-constant value
> ----------------------------------------------
>
>                 Key: SYSTEMML-526
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-526
>             Project: SystemML
>          Issue Type: Improvement
>          Components: APIs
>            Reporter: Deron Eriksson
>
> Currently, the write statement supports variable iofilenames but the read statement does not. For flexibility (such as looping over multiple data files), it would be nice to be able to use iofilenames containing variable values that can change.
> The following code works. It shows how we can write to 3 separate files, but here we're reading from only 1 file.
> {code}
> for (i in 1:3) {
>   m = read("mydata-1.csv");
>   n = m + 1;
>   write(n, "myresult-" + i + ".csv", format="csv");
> }
> {code}
> If I try to read from 3 separate data files utilizing the i variable, I get an error:
> {code}
> for (i in 1:3) {
>   m = read("mydata-" + i + ".csv");
>   n = m + 1;
>   write(n, "myresult-" + i + ".csv", format="csv");
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)