{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/12545","repository_url":"https://api.github.com/repos/apache/incubator-mxnet","labels_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/12545/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/12545/comments","events_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/12545/events","html_url":"https://github.com/apache/incubator-mxnet/pull/12545","id":359735736,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MTU5NTMw","number":12545,"title":"Change the way NDArrayIter handle the last batch","user":{"login":"stu1130","id":6792331,"node_id":"MDQ6VXNlcjY3OTIzMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/6792331?v=4","gravatar_id":"","url":"https://api.github.com/users/stu1130","html_url":"https://github.com/stu1130","followers_url":"https://api.github.com/users/stu1130/followers","following_url":"https://api.github.com/users/stu1130/following{/other_user}","gists_url":"https://api.github.com/users/stu1130/gists{/gist_id}","starred_url":"https://api.github.com/users/stu1130/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stu1130/subscriptions","organizations_url":"https://api.github.com/users/stu1130/orgs","repos_url":"https://api.github.com/users/stu1130/repos","events_url":"https://api.github.com/users/stu1130/events{/privacy}","received_events_url":"https://api.github.com/users/stu1130/received_events","type":"User","site_admin":false},"labels":[{"id":1018798522,"node_id":"MDU6TGFiZWwxMDE4Nzk4NTIy","url":"https://api.github.com/repos/apache/incubator-mxnet/labels/pr-awaiting-review","name":"pr-awaiting-review","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-09-13T04:10:13Z","updated_at":"2018-10-12T22:15:27Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/12545","html_url":"https://github.com/apache/incubator-mxnet/pull/12545","diff_url":"https://github.com/apache/incubator-mxnet/pull/12545.diff","patch_url":"https://github.com/apache/incubator-mxnet/pull/12545.patch"},"body":"## Description ##\r\nUpdate some behaviors of NDArrayIter\r\n * Change the functionality of class NDArrayIter last_batch_handle = roll_over.\r\n * Change the timing of shuffling. Previously, it shuffles only during the initialization, which didn't meet training needs.\r\n\r\nThe above change is tackled by #12285. This PR add the following thing, please refer to [concat](https://github.com/apache/incubator-mxnet/blob/4ec82194ad8b38407a126ce0b1aaf9890987edf8/python/mxnet/io/io.py#L707-L725), [edge case for end variable](https://github.com/apache/incubator-mxnet/blob/4ec82194ad8b38407a126ce0b1aaf9890987edf8/python/mxnet/io/io.py#L694-L695), [unit test for different kinds of input of labels](https://github.com/apache/incubator-mxnet/blob/4ec82194ad8b38407a126ce0b1aaf9890987edf8/tests/python/unittest/test_io.py#L164-L171) and [NDArrayIter_csr](https://github.com/apache/incubator-mxnet/blob/4ec82194ad8b38407a126ce0b1aaf9890987edf8/tests/python/unittest/test_io.py#L198-L207)\r\n * Fix index out of range error (#12526 #12539 #12538) by handling the missing labels case.\r\n\r\n\r\n## Checklist ##\r\n### Essentials ###\r\nPlease feel free to remove inapplicable items for your PR.\r\n- [x] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) created (except PRs with tiny changes)\r\n- [x] Changes are complete (i.e. I finished coding on this PR)\r\n- [x] All changes have test coverage:\r\n- Unit tests are added for small changes to verify correctness (e.g. adding a new operator)\r\n- Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)\r\n- Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)\r\n- [x] Code is well-documented: \r\n- For user-facing API changes, API doc string has been updated. \r\n- For new C++ functions in header files, their functionalities and arguments are documented. \r\n- For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable\r\n- Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html\r\n- [x] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change\r\n\r\n### Changes ###\r\n * shuffle when calling the reset.\r\n * when last_batch_handle is roll_over, the last batch should be rolled over to next epoch\r\n * add the unit tests for different situations (shuffle equals to True/False, data source is mx.NDArray/ np.ndarray, 3 last_batch handle parameters and pass the normal labels/ None/ empty list)\r\n\r\n## Comments ##\r\n@sandeep-krishnamurthy @zhreshold \r\n"},"comment":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/comments/429477653","html_url":"https://github.com/apache/incubator-mxnet/pull/12545#issuecomment-429477653","issue_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/12545","id":429477653,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTQ3NzY1Mw==","user":{"login":"stu1130","id":6792331,"node_id":"MDQ6VXNlcjY3OTIzMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/6792331?v=4","gravatar_id":"","url":"https://api.github.com/users/stu1130","html_url":"https://github.com/stu1130","followers_url":"https://api.github.com/users/stu1130/followers","following_url":"https://api.github.com/users/stu1130/following{/other_user}","gists_url":"https://api.github.com/users/stu1130/gists{/gist_id}","starred_url":"https://api.github.com/users/stu1130/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stu1130/subscriptions","organizations_url":"https://api.github.com/users/stu1130/orgs","repos_url":"https://api.github.com/users/stu1130/repos","events_url":"https://api.github.com/users/stu1130/events{/privacy}","received_events_url":"https://api.github.com/users/stu1130/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T22:15:27Z","updated_at":"2018-10-12T22:15:27Z","author_association":"CONTRIBUTOR","body":"add (5000, 1, 28, 28) data source test case\r\nhttps://github.com/apache/incubator-mxnet/blob/4a7c9018b392c5f8bace62ff92032c32e803cf50/tests/python/unittest/test_io.py#L112-L113"}}
{"actor":{"display_login":"stu1130"}}