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

[MXNET-774] Flaky test in test_executor.py:test_bind #12016

Merged
merged 3 commits into from
Aug 7, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/python/unittest/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def check_bind_with_uniform(uf, gf, dim, sf=None, lshape=None, rshape=None):
assert_almost_equal(rhs_grad.asnumpy(), rhs_grad2, rtol=1e-5, atol=1e-5)


@with_seed(0)
# @roywei: Removing fixed seed as flakiness in this test is fixed
# tracked at: https://github.com/apache/incubator-mxnet/issues/11685
Copy link
Contributor

Choose a reason for hiding this comment

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

Feel free to remove those comments and simply link the issue in description of PR.

@with_seed()
def test_bind():
def check_bind(disable_bulk_exec):
if disable_bulk_exec:
Expand All @@ -97,11 +99,11 @@ def check_bind(disable_bulk_exec):
dim)

check_bind_with_uniform(lambda x, y: np.maximum(x, y),
lambda g, x, y: (g * (x>y), g * (y>x)),
lambda g, x, y: (g * (x>=y), g * (y>x)),
dim,
sf=mx.symbol.maximum)
check_bind_with_uniform(lambda x, y: np.minimum(x, y),
lambda g, x, y: (g * (x<y), g * (y<x)),
lambda g, x, y: (g * (x<=y), g * (y<x)),
dim,
sf=mx.symbol.minimum)
if disable_bulk_exec:
Expand Down