Skip to content

Fix RLCD stage-one setup and dependency handling#268

Merged
kunwuz merged 2 commits into
py-why:mainfrom
kunwuz:fix/rlcd-stage1
Jul 11, 2026
Merged

Fix RLCD stage-one setup and dependency handling#268
kunwuz merged 2 commits into
py-why:mainfrom
kunwuz:fix/rlcd-stage1

Conversation

@kunwuz

@kunwuz kunwuz commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • use pure-Python GES as RLCD's only supported sample-data stage-1 method
  • pass stage1_ges_sparsity to GES through the effective lambda_value argument
  • replace the optional communities dependency with NetworkX for maximal-clique enumeration
  • remove the unreachable Java stage-1 integration that referenced files absent from causal-learn
  • validate stage-1 choices and document the supported behavior
  • add regression coverage for the public default path, parameter forwarding, method validation, clique partitioning, and latent discovery

Background

The NumPy 2 scalar-conversion failure in the released 0.1.4.7 package is real, but it was already fixed on main by #263. The remaining RLCD stage-1 issues were still present on current main: an alternate backend referenced files absent from causal-learn, stage1_ges_sparsity was silently ignored by GES, and importing RLCD required an optional package that a base installation did not provide.

The GES sparsity default changes from 2 to 0.5 to preserve the value that GES previously used after ignoring the obsolete lambda key.

Testing

  • pytest -q tests/TestRLCD.py: 5 passed with NumPy 1.26.4
  • pytest -q tests/TestRLCD.py: 5 passed with NumPy 2.4.4
  • the documented five-indicator latent example passes with the GES stage
  • fresh wheel smoke test passed with NumPy 2.5.1 and no communities installation
  • RLCD package compilation passed
  • git diff --check passed

The existing GES accuracy assertion also fails on untouched main; this change does not modify GES scoring code.

@kunwuz
kunwuz merged commit 0a6f1dc into py-why:main Jul 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant