JulianSlzr opened a new pull request #9877: Better even_split=False support in 
URL: https://github.com/apache/incubator-mxnet/pull/9877
   ## Description ##
   When someone uses `even_split=False`, it means they want the data to be 
processed irrespective of how divisible the amount of data is. Suppose you have 
8 GPUs. The old code would:
   - Error out if the last batch only had 7 samples
   - If you had 64+7 samples, one expects 7 GPUs w/ 9 and 1 GPU w/ 8; however, 
you got 7 GPUs w/ 8 and 1 GPU w/ 15.
   This address both issues.
   ## Checklist ##
   ### Essentials ###
   - [x] Passed code style checking (`make lint`)
   - [x] Changes are complete (i.e. I finished coding on this PR)
   - [x] All changes have test coverage:
   - Unit tests are added for small changes to verify correctness (e.g. adding 
a new operator)
   - Nightly tests are added for complicated/long-running ones (e.g. changing 
distributed kvstore)
   - Build tests will be added for build configuration changes (e.g. adding a 
new build option with NCCL)
   - [x] Code is well-documented: 
   - For user-facing API changes, API doc string has been updated. 
   - For new C++ functions in header files, their functionalities and arguments 
are documented. 
   - 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
   - [x] To the my best knowledge, examples are either not affected by this 
change, or have been fixed to be compatible with this change
   ### Changes ###
   - [x] Support `size < num_slice` case
   - [x] Use `ndarray.split()` when divisible, not just when `even_split=True`
   - [x] More evenly distribute splits
   ## Comments ##
   **One may be concerned by returning less than `num_slice` lists when 
`even_split=False`.** However, this is not a problem idiomatically. E.g., if 
`num_slice = len(context)`, the expression `zip(context, split)` would truncate 
to the length of `split <= num_slice`; note that `split_and_load` works as-is 
after changing `split_data`.

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:

With regards,
Apache Git Services

Reply via email to