Skip to content

Commit

Permalink
Don't seed np.random in the tests, since the core will do it
Browse files Browse the repository at this point in the history
  • Loading branch information
manopapad committed Aug 9, 2023
1 parent c41a47e commit 4a296e2
Show file tree
Hide file tree
Showing 141 changed files with 1 addition and 162 deletions.
2 changes: 1 addition & 1 deletion cmake/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"git_url" : "https://github.com/nv-legate/legate.core.git",
"git_shallow": false,
"always_download": false,
"git_tag" : "35d0d4bd3c9d19946ccc641ec7074b44bbae8046"
"git_tag" : "a405f595603238c8557cb5fefd3981d190a2fb1d"
}
}
}
1 change: 0 additions & 1 deletion scripts/hooks/enforce_boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from typing import NoReturn

BOILERPLATE = [
"np.random.seed(12345)",
"sys.exit(pytest.main(sys.argv))",
]

Expand Down
2 changes: 0 additions & 2 deletions tests/integration/test_0d_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from itertools import product

import numpy as np
import pytest

import cunumeric as num
Expand All @@ -36,5 +35,4 @@ def test_0d_region_backed_stores():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_advanced_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,5 +969,4 @@ def test():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_allclose.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,5 +296,4 @@ def test_scalar_rtol_atol_false(a, b):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_amax_amin.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,5 +290,4 @@ def test_out_invalid_shape(self, func_name, axis_out_shape):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_append.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,4 @@ def test_bad_shape(self):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_arg_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,4 @@ def test_argmax_and_argmin_out(self, func_name, ndim, keepdims):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_argsort.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,4 @@ def test_basic_complex_axis_sort(self, size, sort_type):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,4 @@ def test_invalid_dtype(self, obj, dtype):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_array_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,5 +276,4 @@ def test_zero_with_0d_ndarray_shape():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_array_dunders.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,4 @@ def test_array_ufunc_defer():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_array_equal.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,4 @@ def test_equal_nan_complex_values(equal_nan):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
2 changes: 0 additions & 2 deletions tests/integration/test_array_fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.
#

import numpy as np
import pytest

import cunumeric as num
Expand All @@ -36,5 +35,4 @@ def test_unimplemented_method_self_fallback():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_array_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,4 @@ def test_array_split(size):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_astype.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,4 @@ def test_complex_negative(src_dtype):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_atleast_nd.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,4 @@ def test_atleast_nd(dim):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_binary_op_broadcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,4 @@ def test_random(shape, ndim):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_binary_op_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,4 @@ def test_pow(x, y):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_binary_op_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,4 @@ def test_array_scalar(lhs_np, rhs_np, lhs_num, rhs_num):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_binary_ufunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,5 +235,4 @@ def parse_inputs(in_str, dtype_str):
in_np = parse_inputs(args.inputs, args.dtypes)
check_ops([args.op], in_np)
else:
np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_bincount.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,4 @@ def test_bincount_size_one(weights):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_bits.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,4 @@ def test_pack_unpack(ndim, bitorder, dtype):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,4 @@ def test_different_ndims_depths(self):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_broadcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,5 +190,4 @@ def test_broadcast_to_mainpulation(dim):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_cholesky.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,4 @@ def test_complex(n):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,4 @@ def test_out_with_array_amin():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_complex_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,4 @@ def test_assignment(real_val, imag_val):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,4 @@ def test_ndim_out(ndim):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_concatenate_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,5 +567,4 @@ def test_arrays_mismatched_shape(self, arrays):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
2 changes: 0 additions & 2 deletions tests/integration/test_contains.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from functools import reduce

import numpy as np
import pytest
from utils.generators import mk_seq_array

Expand Down Expand Up @@ -61,5 +60,4 @@ def test_complex(size):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_convolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,4 @@ def test_ndim(ndim):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ def test_basic():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
2 changes: 0 additions & 2 deletions tests/integration/test_data_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.
#

import numpy as np
import pytest

import cunumeric as num
Expand Down Expand Up @@ -43,5 +42,4 @@ def test_roundtrip(dtype):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_diag_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,4 @@ def test_unequal_length(self, size):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,4 @@ def test_out_invalid_dtype(self, dtype):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_einsum.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,5 +312,4 @@ def test_order(order):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_einsum_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,4 @@ def test_einsum_path_optimize_none():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,4 @@ def test_casting(casting):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,5 +294,4 @@ def test_vals_empty(self):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_eye.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,4 @@ def testBadK(self):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ def test_ufunc():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_fft_c2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,5 +268,4 @@ def test_fftn_dtype(dtype, func):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_fft_c2r.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,4 @@ def test_4d():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_fft_hermitian.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,4 @@ def test_1d_inverse():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_fft_r2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,4 @@ def test_4d():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,4 @@ def test_fill_string_to_float() -> None:
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_fill_diagonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,4 @@ def test_val_none(self):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,4 @@ def test_views_inherit_writeable(self, params):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_flatten.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,4 @@ def test_bad_string_order(self):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_flip.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,4 @@ def test_axis_2d(self, axis):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,4 @@ def test_typing_unary(fun, dtype, shape):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_get_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,4 @@ def test_empty_slice():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,5 +207,4 @@ def test_histogram_singleton_empty(src, bins):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,4 @@ def test_dtype(dtype):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_index_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,5 +557,4 @@ def test_k_none(self):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,4 @@ def test_indices_sparse(self, ndim):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
1 change: 0 additions & 1 deletion tests/integration/test_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,4 @@ def test(custom_partitioning, custom_sharding):
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
2 changes: 0 additions & 2 deletions tests/integration/test_inlinemap-keeps-region-alive.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import gc

import numpy as np
import pytest

import cunumeric as num
Expand All @@ -30,5 +29,4 @@ def test_all():
if __name__ == "__main__":
import sys

np.random.seed(12345)
sys.exit(pytest.main(sys.argv))
Loading

0 comments on commit 4a296e2

Please sign in to comment.