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

Bump up atol for test_bilinear_resize_op to fix flakiness #15011

Merged
merged 1 commit into from
May 21, 2019

Conversation

haojin2
Copy link
Contributor

@haojin2 haojin2 commented May 21, 2019

Description

As title.

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

  • As title

Comments

This test is a bit too long (~317 seconds for 10 trials) so not able to verify 10000 times. Proving the fix with a before-after comparison.
Before:

MXNET_TEST_SEED=1608036320 nosetests tests/python/gpu/test_operator_gpu.py:test_bilinear_resize_op
[INFO] Setting module np/mx/python random seeds, use MXNET_MODULE_SEED=354422934 to reproduce.
[WARNING] *** test-level seed set: all "@with_seed()" tests run deterministically ***
[INFO] Setting test np/mx/python random seeds, use MXNET_TEST_SEED=1608036320 to reproduce.
F
======================================================================
FAIL: test_operator_gpu.test_bilinear_resize_op
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/python3/dist-packages/nose/util.py", line 620, in newfunc
    return func(*arg, **kw)
  File "/home/ubuntu/9-mxnet/tests/python/gpu/../unittest/common.py", line 177, in test_new
    orig_test(*args, **kwargs)
  File "/home/ubuntu/9-mxnet/tests/python/gpu/../unittest/test_operator.py", line 7407, in test_bilinear_resize_op
    check_bilinear_resize_modes_op(shape_0, shape_1=shape_1, mode='like')
  File "/home/ubuntu/9-mxnet/tests/python/gpu/../unittest/test_operator.py", line 7381, in check_bilinear_resize_modes_op
    check_numeric_gradient(resize_sym, [data_np, date_np_like])
  File "/home/ubuntu/9-mxnet/python/mxnet/test_utils.py", line 980, in check_numeric_gradient
    ("NUMERICAL_%s"%name, "BACKWARD_%s"%name))
  File "/home/ubuntu/9-mxnet/python/mxnet/test_utils.py", line 503, in assert_almost_equal
    raise AssertionError(msg)
AssertionError: 
Items are not equal:
Error 1.004549 exceeds tolerance rtol=0.010000, atol=0.000000.  Location of maximum error:(1, 0, 12, 12), a=0.004321, b=0.004278
 NUMERICAL_data: array([[[[0.84230304, 0.        , 0.57831407, ..., 0.1641959 ,
          0.        , 0.331074  ],
         [0.        , 0.        , 0.        , ..., 0.        ,...
 BACKWARD_data: array([[[[0.84230524, 0.        , 0.5783209 , ..., 0.16419744,
          0.        , 0.33107594],
         [0.        , 0.        , 0.        , ..., 0.        ,...
-------------------- >> begin captured logging << --------------------
common: INFO: Setting module np/mx/python random seeds, use MXNET_MODULE_SEED=354422934 to reproduce.
common: WARNING: *** test-level seed set: all "@with_seed()" tests run deterministically ***
common: INFO: Setting test np/mx/python random seeds, use MXNET_TEST_SEED=1608036320 to reproduce.
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 1 test in 45.946s

FAILED (failures=1)

After:

MXNET_TEST_SEED=1608036320 nosetests tests/python/gpu/test_operator_gpu.py:test_bilinear_resize_op
[INFO] Setting module np/mx/python random seeds, use MXNET_MODULE_SEED=1573659249 to reproduce.
[WARNING] *** test-level seed set: all "@with_seed()" tests run deterministically ***
[INFO] Setting test np/mx/python random seeds, use MXNET_TEST_SEED=1608036320 to reproduce.
.
----------------------------------------------------------------------
Ran 1 test in 47.239s

OK

@haojin2
Copy link
Contributor Author

haojin2 commented May 21, 2019

Fix for #14902.

@haojin2
Copy link
Contributor Author

haojin2 commented May 21, 2019

@marcoabreu Ping for review

@haojin2
Copy link
Contributor Author

haojin2 commented May 21, 2019

@perdasilva Please give an approval if you think this is good to go, thanks!

@marcoabreu marcoabreu merged commit f680255 into apache:master May 21, 2019
perdasilva pushed a commit to perdasilva/incubator-mxnet that referenced this pull request May 21, 2019
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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants