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

Commit

Permalink
fix flakiness of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
haojin2 committed Sep 1, 2019
1 parent da39b86 commit f908813
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/python/unittest/test_numpy_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ def is_int(dtype):
for axis in ([i for i in range(in_data_dim)] + [(), None]):
for itype in ['float16', 'float32', 'float64']:
for dtype in ['float16', 'float32', 'float64']:
print(itype, dtype)
if is_int(dtype) and not is_int(itype):
continue
# test gluon
Expand Down Expand Up @@ -494,7 +493,7 @@ def legalize_shape(shape):
for dtype in ['float16', 'float32', 'float64']:
if is_int(dtype) and not is_int(itype) or is_int(itype) and is_int(dtype):
continue
atol = 1e-4 if itype == 'float16' or dtype == 'float16' else 1e-5
atol = 3e-4 if itype == 'float16' or dtype == 'float16' else 1e-5
rtol = 1e-2 if itype == 'float16' or dtype == 'float16' else 1e-3
# test gluon
test_moment = TestMoment(name, axis=axis, dtype=dtype, keepdims=keepdims, ddof=ddof)
Expand Down

0 comments on commit f908813

Please sign in to comment.