Repository navigation
docs: say which icebug algorithms use exported edge weights - #218
Merged
Merged
Conversation
The graph algorithms page only said that algorithms such as Dijkstra use the weights. In icebug 13.6 some algorithms ignore them without a warning, one refuses weighted graphs, and two need an editable copy that keeps the weights. List each, note which limits need icebug changes, and test weighted betweenness, Louvain and the copy.
Deploying lance-csr with
|
| Latest commit: |
fd4f2fe
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://913735f2.lance-csr.pages.dev |
| Branch Preview URL: | https://docs-weighted-icebug-algorit.lance-csr.pages.dev |
Rename the weighted section to Edge weights and say the export has no node weights. Introduce the icebug section with weighted PageRank on the messages export, show where each variable comes from, give the max flow example concrete ids and output, and describe the icebug limits as what icebug supports rather than changes it needs.
Keyword arguments spare readers icebug's positional order, and a short comment says what each CSR array holds.
Tests always pass on main, so the three test badges said nothing. Show recent downloads from crates.io (90 days, its only recent count), PyPI and npm (per month) in their place.
Download badges depend on registry APIs that rate-limit shields.io, so readers could see an error instead of a count. Keep only the license and version badges.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#200 added edge weights to
export_graph, and the docs said only that algorithms "such asib.distance.Dijkstra" use them. That left readers to guess about the rest, and #200's note "Not covered: icebug's weighted community detection or centrality beyond Dijkstra" read as if the export didn't support them. It does: onceGraph.fromCSRgets the weight arrays, icebug decides per algorithm whether to read them. Some algorithms in icebug 13.6 ignore them without a warning, one refuses a weighted graph, and two need an editable copy. This PR says which is which.What changed
The weighted section is renamed "Edge weights" and now says the export carries no node weights. The icebug part of the graph algorithms page gets an "Edge weights in icebug" section:
messagesexport, showing how the scores move once follows carry weights.Betweenness,PLM(Louvain) andParallelLeidenuse them;KadabraBetweenness,TopClosenessandSpanningForestdon't.ApproxElectricalClosenessraises an error on a weighted graph.SpanningEdgeCentralityandflow.EdmondsKarpneedindexEdges(), which fails on a read-onlyfromCSRgraph. They run onib.Graph(graph, weighted=True, directed=...); withoutweighted=Truethe copy drops the weights. A max flow example on the same data shows it.The README drops its three test-status badges, which always show passing on
mainand so tell readers nothing. The license and package version badges stay.Three new icebug tests check the claims: weighted betweenness takes the cheap route only, Louvain separates two groups of a complete graph by weight alone, and the copy keeps the weights (a max flow of 6 against 2 with unit capacities) while a plain copy drops them. Like the existing icebug tests, they skip when icebug isn't installed.
Validation
uv run --no-sync --with icebug==13.6 --with networkx pytest python/tests/test_graph_export.py -k icebug; the Louvain test passed 15 runs out of 15.make lint,docs/check_snippets.py,zensical build --strictandtypos: pass. CI hasn't run yet.🤖 Generated with Claude Code