Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some canned algorithms in libgalois modify the PropertyGraph they are passed #187

Open
arthurp opened this issue Apr 27, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@arthurp
Copy link
Contributor

arthurp commented Apr 27, 2021

Several algorithms modify the graph they are passed. Specifically they relabel nodes and edges. This is a pretty serious issue since it is not an expected behavior for an algorithm to just randomly rename things.

Currently this affects:

  • K-truss
  • Local clustering coefficient

You can search for my TODOs with: https://github.com/KatanaGraph/katana/search?q=%22Don%27t+mutate+the+users+topology%22

The long term solution to this is complex because it will require something like this (as pseudo-code; these functions don't exist.):

# Create our working copy of the graph
working_pg = pg.Copy()
# Relabel nodes and edges as needed
permutation = RelabelThings(working_pg)
# Run the actual algorithm
RunAlgorithm(working_pg, output_properties)
# Copy the output properties back to the original graph, reverting the permutation.
pg.AddProperties(PermuteProperties(working_pg, output_properties, permutation))

Though as RDGs mature, the ideal would be having a lazily constructed relabel of the graph that is created and then cached between algorithm runs. We would still need some support for moving/reordering properties between different relabels of graphs.

@arthurp arthurp added the bug Something isn't working label Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant