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

fix: reduce root lookups to find inactive edges #475

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

akhileshh
Copy link
Contributor

No description provided.

@akhileshh akhileshh requested a review from sdorkenw November 1, 2023 15:14
Copy link
Contributor

@sdorkenw sdorkenw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; only one minor point

_edges = subgraph_edges[edge_layers == layer]
edge_nodes = fastremap.unique(_edges.ravel())
roots = cg.get_roots(edge_nodes, time_stamp=parent_ts, stop_layer=layer + 1)
parent_map = dict(zip(edge_nodes, roots))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can mask issues in the return of the roots. Could you add a check along the lines of
assert len(roots) == len(edge_nodes)

@sdorkenw sdorkenw merged commit 6327bd7 into main Nov 1, 2023
1 check passed
@sdorkenw sdorkenw deleted the preprocess-reduce-root-lookups branch November 1, 2023 20:36
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.

2 participants