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

Mark test_dropout as flaky #19553

Merged
merged 1 commit into from
Nov 25, 2020
Merged

Mark test_dropout as flaky #19553

merged 1 commit into from
Nov 25, 2020

Conversation

leezu
Copy link
Contributor

@leezu leezu commented Nov 17, 2020

Two issues.

Issue 1: #14288

Issue 2:

[2020-11-17T06:58:34.678Z] def check_passthrough(ratio, shape, cudnn_off=True):
[2020-11-17T06:58:34.678Z] # test inference_mode forward and then backward
[2020-11-17T06:58:34.678Z] a = mx.random.uniform(shape=shape)
[2020-11-17T06:58:34.678Z] a.attach_grad()
[2020-11-17T06:58:34.678Z] with mx.autograd.record(train_mode=False):
[2020-11-17T06:58:34.678Z] b = mx.nd.Dropout(a, ratio, cudnn_off=cudnn_off) # dropout acts as identity
[2020-11-17T06:58:34.678Z] b.backward()
[2020-11-17T06:58:34.678Z] assert_almost_equal(a.grad.asnumpy(), mx.nd.ones_like(b).asnumpy())
[2020-11-17T06:58:34.678Z]
[2020-11-17T06:58:34.678Z] shape = (100, 100)
[2020-11-17T06:58:34.678Z] check_dropout_ratio(0.5, shape)
[2020-11-17T06:58:34.678Z] check_dropout_ratio(0.0, shape)
[2020-11-17T06:58:34.678Z] > check_dropout_ratio(1.0, shape)
[...]
[2020-11-17T06:58:34.678Z] # Hopefully should be within ratio/2 %
[2020-11-17T06:58:34.678Z] error = abs(output_sum - input_sum) / input_sum
[2020-11-17T06:58:34.678Z] if ratio == 1.0:
[2020-11-17T06:58:34.678Z] > assert output_zeroes == len(input)
[2020-11-17T06:58:34.678Z] E assert 9999 == 10000
[2020-11-17T06:58:34.678Z] E +9999
[2020-11-17T06:58:34.678Z] E -10000

Two issues.

Issue 1: #14288

Issue 2:

[2020-11-17T06:58:34.678Z]         def check_passthrough(ratio, shape, cudnn_off=True):
[2020-11-17T06:58:34.678Z]             # test inference_mode forward and then backward
[2020-11-17T06:58:34.678Z]             a = mx.random.uniform(shape=shape)
[2020-11-17T06:58:34.678Z]             a.attach_grad()
[2020-11-17T06:58:34.678Z]             with mx.autograd.record(train_mode=False):
[2020-11-17T06:58:34.678Z]                 b = mx.nd.Dropout(a, ratio, cudnn_off=cudnn_off) # dropout acts as identity
[2020-11-17T06:58:34.678Z]             b.backward()
[2020-11-17T06:58:34.678Z]             assert_almost_equal(a.grad.asnumpy(), mx.nd.ones_like(b).asnumpy())
[2020-11-17T06:58:34.678Z]     
[2020-11-17T06:58:34.678Z]         shape = (100, 100)
[2020-11-17T06:58:34.678Z]         check_dropout_ratio(0.5, shape)
[2020-11-17T06:58:34.678Z]         check_dropout_ratio(0.0, shape)
[2020-11-17T06:58:34.678Z] >       check_dropout_ratio(1.0, shape)
[...]
[2020-11-17T06:58:34.678Z]         # Hopefully should be within ratio/2 %
[2020-11-17T06:58:34.678Z]         error = abs(output_sum - input_sum) / input_sum
[2020-11-17T06:58:34.678Z]         if ratio == 1.0:
[2020-11-17T06:58:34.678Z] >           assert output_zeroes == len(input)
[2020-11-17T06:58:34.678Z] E           assert 9999 == 10000
[2020-11-17T06:58:34.678Z] E             +9999
[2020-11-17T06:58:34.678Z] E             -10000
@mxnet-bot
Copy link

Hey @leezu , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [centos-cpu, clang, edge, unix-cpu, windows-cpu, windows-gpu, centos-gpu, miscellaneous, unix-gpu, sanity, website]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@lanking520 lanking520 added the pr-awaiting-testing PR is reviewed and waiting CI build and test label Nov 17, 2020
@lanking520 lanking520 added pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels Nov 17, 2020
@leezu
Copy link
Contributor Author

leezu commented Nov 24, 2020

@mxnet-bot run ci [windows-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [windows-gpu]

@lanking520 lanking520 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-merge Review and CI is complete. Ready to Merge and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Nov 24, 2020
@leezu leezu merged commit 16be29d into master Nov 25, 2020
@leezu leezu deleted the leezu-patch-2 branch November 25, 2020 22:33
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants