Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fixes test_operator_gpu.test_multinomial_generator #14475

Merged
merged 2 commits into from
Mar 21, 2019

Conversation

stu1130
Copy link
Contributor

@stu1130 stu1130 commented Mar 20, 2019

Description

Fixes #14457, Fixes #14158
success_rate of the verify_generator function was changing from 0.15 to 0.25 after the this #13498. Since then the test became flaky. Reassign the success_rate to 0.2.

# in func verify_generator inside test_utilis.py
success_num = (np.array(cs_ret_l) > alpha).sum()
    if success_num < nrepeat * success_rate:
# here both of the issue failed with 1 < 5 * 0.25
# by changing the 0.25 -> 0.2 solve these edge case but still have strictness

Run 9606 times pass the test.

MXNET_TEST_COUNT=10000 nosetests -v test_operator_gpu.py:test_multinomial_generator
^C[INFO] 9609 of 10000: Setting test np/mx/python random seeds, use MXNET_TEST_SEED=262122728 to reproduce.

----------------------------------------------------------------------
Ran 1 test in 95632.373s

OK

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • 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:https://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

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

Copy link
Member

@yuxihu yuxihu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

"Fixes #14457, #14158" => "Fixes #14457, Fixes #14158" such that you can close both.

@pinaraws
Copy link

@mxnet-label-bot add[Test, pr-awaiting-merge]

@marcoabreu marcoabreu added pr-awaiting-merge Review and CI is complete. Ready to Merge Test labels Mar 20, 2019
Copy link
Contributor

@apeforest apeforest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@apeforest
Copy link
Contributor

Can you add a comment in the code that this success_rate might make the tests flaky. Please also refer to the issue number in your comment.

@wkcn wkcn merged commit a01bdee into apache:master Mar 21, 2019
@wkcn
Copy link
Member

wkcn commented Mar 21, 2019

Merged. Thanks for your contribution!

vdantu pushed a commit to vdantu/incubator-mxnet that referenced this pull request Mar 31, 2019
ZhennanQin pushed a commit to ZhennanQin/incubator-mxnet that referenced this pull request Apr 3, 2019
nswamy pushed a commit that referenced this pull request Apr 5, 2019
* adjust the success rate

* add comments
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-merge Review and CI is complete. Ready to Merge Test
Projects
None yet
6 participants