From d9a8dc7165198d5fabe6e8462df3abf36177c128 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Mon, 23 Oct 2023 17:14:44 -0500 Subject: [PATCH] nx-cugraph: xfail test_louvain.py:test_threshold in Python 3.9 (#3944) This test is flaky b/c Louvain in PLC does not have a seed or random state parameter. This test holds the seed fixed and changes the threshold, but clearly this may not work if we can't set the seed. Authors: - Erik Welch (https://github.com/eriknw) Approvers: - Rick Ratzel (https://github.com/rlratzel) - Naim (https://github.com/naimnv) URL: https://github.com/rapidsai/cugraph/pull/3944 --- python/nx-cugraph/nx_cugraph/interface.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/nx-cugraph/nx_cugraph/interface.py b/python/nx-cugraph/nx_cugraph/interface.py index 124b86a4af2..a7b88b72ec5 100644 --- a/python/nx-cugraph/nx_cugraph/interface.py +++ b/python/nx-cugraph/nx_cugraph/interface.py @@ -12,6 +12,8 @@ # limitations under the License. from __future__ import annotations +import sys + import networkx as nx import nx_cugraph as nxcg @@ -180,6 +182,11 @@ def key(testpath): ): "self-loops not handled in Louvain", } ) + if sys.version_info[:2] == (3, 9): + # This test is sensitive to RNG, which depends on Python version + xfail[ + key("test_louvain.py:test_threshold") + ] = "Louvain does not support seed parameter" for item in items: kset = set(item.keywords)