From 1ead39669ea4d03b850f9d6ab58d864cea5bab5f Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Wed, 13 Mar 2024 14:33:48 -0700 Subject: [PATCH] Make test_read_parquet_partitioned_filtered data deterministic --- python/cudf/cudf/tests/test_parquet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/cudf/cudf/tests/test_parquet.py b/python/cudf/cudf/tests/test_parquet.py index ab2b03d7302..18efd4417a1 100644 --- a/python/cudf/cudf/tests/test_parquet.py +++ b/python/cudf/cudf/tests/test_parquet.py @@ -2112,13 +2112,14 @@ def test_parquet_write_to_dataset(tmpdir_factory, cols): def test_read_parquet_partitioned_filtered( tmpdir, pfilters, selection, use_cat ): + rng = np.random.default_rng(2) path = str(tmpdir) size = 100 df = cudf.DataFrame( { "a": np.arange(0, stop=size, dtype="int64"), - "b": np.random.choice(list("abcd"), size=size), - "c": np.random.choice(np.arange(4), size=size), + "b": rng.choice(list("abcd"), size=size), + "c": rng.choice(np.arange(4), size=size), } ) df.to_parquet(path, partition_cols=["c", "b"])