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/08/03 01:15:28 UTC

[GitHub] roywei opened a new pull request #12016: [MXNET-774] Flaky test in test_executor.py:test_bind

roywei opened a new pull request #12016: [MXNET-774] Flaky test in test_executor.py:test_bind
URL: https://github.com/apache/incubator-mxnet/pull/12016
 
 
   ## Description ##
   **1. fix flaky test #11685 
   2. Pass 10,000 runs.**
   **3. Root cause explained:** 
   
   In this unit test, during testing of mx.sym.maximum and minimum. It didn't cover the case when x and y is equal. 
    See [Line 100](https://github.com/apache/incubator-mxnet/blob/master/tests/python/unittest/test_executor.py#L100)
   when x = y, the following line 
   ```
   lambda g, x, y: (g * (x>y), g * (y>x)
   ```
   will return `(0, 0)` when the correct value should be `(1, 0)`
   
   In MXNet symbolic implementation, mx.sym.maximum and minimum is using the following logic for element-wise comparison:
   
   maximum is using  (greater or equal, less than) see [here](https://github.com/apache/incubator-mxnet/blob/master/src/operator/tensor/elemwise_binary_broadcast_op_extended.cc#L96)
   minimum is using  (less or equal, greater than) see [here](
   https://github.com/apache/incubator-mxnet/blob/master/src/operator/tensor/elemwise_binary_broadcast_op_extended.cc#L131)
   
   Modified accordingly and removed fixed seed.
   
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [ ] The PR title starts with [MXNET-774](https://issues.apache.org/jira/browse/MXNET-774) 
   - [ ] Changes are complete (i.e. I finished coding on this PR)
   - [ ] 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)
   - [ ] 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
   - Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
   - [ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [ ] Feature1, tests, (and when applicable, API doc)
   - [ ] Feature2, tests, (and when applicable, API doc)
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be made.
   - Interesting edge cases to note here
   

----------------------------------------------------------------
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