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/05/15 23:49:19 UTC

[GitHub] DickJC123 opened a new pull request #10961: [MXNET-10896] [MXNET-10901] Fix test_sparse_mathematical_core sensitivity to scipy v1.1

DickJC123 opened a new pull request #10961: [MXNET-10896] [MXNET-10901] Fix test_sparse_mathematical_core sensitivity to scipy v1.1
URL: https://github.com/apache/incubator-mxnet/pull/10961
 
 
   ## Description ##
   On scipy v1.0, psi([0, -1, -2, -3, ...]) = [ inf, inf, inf, inf, ...]
   On scipy v1.1, psi([0, -1, -2, -3, ...]) = [-inf, nan, nan, nan, ...]
   
   The test_sparse_mathematical_core test uses psi(0) and so began failing when public servers started offering scipy v1.1 (with its alternate behavior) by default.  Here we map the behavior of v1.1 psi() to that of v1.0 for ints <= 0 for consistency and to match the MXNet operator behavior, which returns inf for these cases.  The proper behavior of psi at locations that are discontinuities of the related gamma function is debatable and likely of little practical consequence.
   
   I also modified the check for scipy import failure to be cleaner and consistent with other similar scipy imports (e.g. in test_sparse_ndarray.py).
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [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)
   - [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
   - Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
   - [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 ###
   - [ ] 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