You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/02/09 22:11:01 UTC

[GitHub] chsin opened a new issue #9755: Feature request: Update Core API

chsin opened a new issue #9755: Feature request: Update Core API
URL: https://github.com/apache/incubator-mxnet/issues/9755
 
 
   The Core API's [IO](https://github.com/apache/incubator-mxnet/tree/master/src/io) isn't being updated to incude [NDArrayIter](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/io.py#L544), which forces developers for the other languages to write equivalants. If `NDArrayIter` were in the Core API like `CSVIter`, `ImageRecordIter`, `MNISTIter`, etc, then it would be called by all languages through each language's MXDataIter wrapper. 
   
   `NDArrayiter` was first introduced as [NumpyIter](https://github.com/apache/incubator-mxnet/blob/f6327ecf86d8a169ec1277c1e7809ed14f89b0c0/python/mxnet/io.py#L83) by @sneakerkg in 2015, but evolved into a general numeric vector iterator that is useful in languages other than Python, such as in R, which defined but doesn't implement an [R NDArrayIter](https://github.com/apache/incubator-mxnet/blob/master/R-package/src/io.h#L92) as seen in the comments:
   ```
   /*!
    * \brief data iterator that takes a NumericVector
    *  Shuffles it and iterate over its content.
    *  TODO(KK, tq) implement this when have time.
    *  c.f. python/io.py:NDArrayIter
    */
   ```
   It would make more sense to have `NDArrayIter` in the Core, so it can be called by [R's MXDataIter wrapper](https://github.com/apache/incubator-mxnet/blob/master/R-package/src/io.h#L53). Then it could also be accessed by [Scala's MXDataIter wrapper](https://github.com/apache/incubator-mxnet/blob/master/scala-package/core/src/main/scala/ml/dmlc/mxnet/io//MXDataIter.scala). But instead, they had to code and test their own [Scala NDArrayIter](https://github.com/apache/incubator-mxnet/blob/master/scala-package/core/src/main/scala/ml/dmlc/mxnet/io/NDArrayIter.scala). The C++ API doesn?t even mention `NDArrayIter` and only has the [C++ MXDataIter wrapper](https://github.com/apache/incubator-mxnet/blob/master/cpp-package/include/mxnet-cpp/io.h). 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services