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

[BUG] cugraph.subgraph() requires renumbered input graph and should not #1899

Closed
rlratzel opened this issue Oct 22, 2021 · 0 comments · Fixed by #1901
Closed

[BUG] cugraph.subgraph() requires renumbered input graph and should not #1899

rlratzel opened this issue Oct 22, 2021 · 0 comments · Fixed by #1901
Assignees
Labels
? - Needs Triage Need team to review and classify bug Something isn't working
Milestone

Comments

@rlratzel
Copy link
Contributor

Calling cugraph.subgraph() with a Graph object that hasn't been renumbered results in a traceback:

File ".../lib/python3.8/site-packages/cugraph/community/subgraph_extraction.py", line 74, in subgraph
    df, source=src_names, destination=dst_names,
UnboundLocalError: local variable 'src_names' referenced before assignment

This is likely because src_names seems to be defined only in a block of code executed if the input graph is renumbered.

@rlratzel rlratzel added bug Something isn't working ? - Needs Triage Need team to review and classify python labels Oct 22, 2021
@rlratzel rlratzel added this to the 21.12 milestone Oct 22, 2021
@rlratzel rlratzel self-assigned this Oct 22, 2021
rlratzel added a commit to rlratzel/cugraph that referenced this issue Oct 23, 2021
…that has not been renumbered is handled correctly by cugraph.subgraph()
rapids-bot bot pushed a commit that referenced this issue Oct 27, 2021
…r handling non-renumbered Graphs (#1901)

* Updates for latest cuDF which changes how `Series` objects are constructed from `Buffer` types.
* Updated `ci/gpu/build.sh` to add the conda env `bin` dir to `PATH`, since it was not finding the correct `cmake` during a local run.
* Cleaned up various cython imports.
* Added test and bug fix to ensure a graph that has not been renumbered is handled correctly by `cugraph.subgraph()`.
* Updated `pytest.ini` for users that don't have the required extra pytest plugins installed, left comments in place to for users to re-enable.
* Minor test and code cleanup.

closes #1908 
closes #1899 

_Note: this PR was originally intended to be two PRs: one for the `subgraph` bug fix, and another for the `cudf.Series` updates. I accidentally pushed the Series updates to the wrong branch, hence this combined PR. I can separate them if reviewing is too difficult._

Authors:
  - Rick Ratzel (https://github.com/rlratzel)

Approvers:
  - Chuck Hastings (https://github.com/ChuckHastings)
  - Brad Rees (https://github.com/BradReesWork)
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify bug Something isn't working
Projects
None yet
1 participant