Skip to content

Commit

Permalink
[MXNET-774] Flaky test in test_executor.py:test_bind (apache#12016)
Browse files Browse the repository at this point in the history
* fix test bind, remove fixed seed

* add tracking info

* remove tracking info
  • Loading branch information
roywei authored and aaronmarkham committed Aug 7, 2018
1 parent 82ca632 commit e1419f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/_static/js/sidebar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*Preprocess*/
var LANG = ['python', 'scala', 'r', 'julia', 'c++', 'perl'];
var LANG = ['python', 'scala', 'clojure', 'r', 'julia', 'c++', 'perl'];
var TITLE_WITH_LANG = ['/get_started/', '/tutorials/', '/faq/', '/architecture/', '/community/'];
for(var i = 0; i < LANG.length; ++i) {
TITLE_WITH_LANG.push('/api/' + LANG[i] + '/');
Expand Down
9 changes: 5 additions & 4 deletions docs/_static/mxnet-theme/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ <h1 id="logo-wrap">
<span id="dropdown-menu-position-anchor">
<a href="#" class="main-nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">API <span class="caret"></span></a>
<ul id="package-dropdown-menu" class="dropdown-menu navbar-menu">
<li><a class="main-nav-link" href="{{url_root}}api/python/index.html">Python</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/c++/index.html">C++</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/scala/index.html">Scala</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/clojure/index.html">Clojure</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/julia/index.html">Julia</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/perl/index.html">Perl</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/python/index.html">Python</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/r/index.html">R</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/scala/index.html">Scala</a></li>
</ul>
</span>

Expand All @@ -50,7 +51,7 @@ <h1 id="logo-wrap">
</ul>
</span>
</nav>

<script> function getRootPath(){ return "{{url_root}}" } </script>
<div class="burgerIcon dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"></a>
Expand All @@ -71,7 +72,7 @@ <h1 id="logo-wrap">
<li class="dropdown-submenu">
<a href="#" tabindex="-1" role="button" aria-haspopup="true" class="dropdown-toggle burger-link" data-toggle="dropdown">{{name}}</a>
<ul class="dropdown-menu">
{% for lang in ['Python', 'Scala', 'R', 'Julia', 'C++', 'Perl'] %}
{% for lang in ['Python', 'Scala', 'Clojure', 'R', 'Julia', 'C++', 'Perl'] %}
<li><a tabindex="-1" href="{{url_root}}{{name.lower()|replace(" ", "_")}}/{{lang.lower()}}/index.html">{{lang}}</a>
</li>
{% endfor %}
Expand Down
6 changes: 3 additions & 3 deletions tests/python/unittest/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ 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)
@with_seed()
def test_bind():
def check_bind(disable_bulk_exec):
if disable_bulk_exec:
Expand All @@ -97,11 +97,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

0 comments on commit e1419f8

Please sign in to comment.