Skip to content

Conversation

@vertumnal
Copy link

@vertumnal vertumnal commented Dec 9, 2025

Negative edge weights interfere with Graclus clustering and can cause an indefinite hang when executed on CUDA. This adds a small check to validate the edge weights supplied as input are positive.

An alternative would be to tweak the CUDA implementation to safely handle negative weights, but the effectiveness of the algorithm would still be spotty as negative edge weights can prevent merges and result in many singleton clusters.

#fixes pyg-team/pytorch_geometric#10548

Added validation to check for negative edge weights in Graclus clustering.
Change to flake8 standards and move to first weight is not None call
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.29%. Comparing base (f2d9919) to head (2c104c7).
⚠️ Report is 16 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #262      +/-   ##
==========================================
- Coverage   97.32%   97.29%   -0.03%     
==========================================
  Files          11       11              
  Lines         224      222       -2     
==========================================
- Hits          218      216       -2     
  Misses          6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Graclus hangs indefinitely on GPU

2 participants