Skip to content

Commit

Permalink
nx-cugraph: xfail test_louvain.py:test_threshold in Python 3.9 (#3944)
Browse files Browse the repository at this point in the history
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: #3944
  • Loading branch information
eriknw authored Oct 23, 2023
1 parent 0fd5883 commit d9a8dc7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/nx-cugraph/nx_cugraph/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# limitations under the License.
from __future__ import annotations

import sys

import networkx as nx

import nx_cugraph as nxcg
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d9a8dc7

Please sign in to comment.