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] Rename cugraph-ops symbols (refactoring) and update GHA workflows to call pytest via python -m pytest #3688

Merged
merged 5 commits into from
Jul 5, 2023

Conversation

naimnv
Copy link
Contributor

@naimnv naimnv commented Jul 5, 2023

This PR:

  • renames cugraph-ops symbols and updates tests in cugraph-dgl and -pyg based on cugraph-ops refactoring
  • updates GHA workflows to call pytest via python -m pytest. This is to fix the pytest not found error in log.

@naimnv naimnv requested review from a team as code owners July 5, 2023 00:24
@naimnv naimnv changed the title Patch 4 Update pr.yaml to use pytest module as script Jul 5, 2023
@naimnv naimnv added bug Something isn't working non-breaking Non-breaking change labels Jul 5, 2023
@naimnv naimnv changed the title Update pr.yaml to use pytest module as script Update pr.yaml to use pytest module as script on top of changes renaming of cugraph-ops symbols (refactoring) Jul 5, 2023
@naimnv naimnv changed the title Update pr.yaml to use pytest module as script on top of changes renaming of cugraph-ops symbols (refactoring) Update pr.yaml to use pytest module as script on top off #3683 [FIX] renaming of cugraph-ops symbols (refactoring) Jul 5, 2023
@naimnv naimnv changed the title Update pr.yaml to use pytest module as script on top off #3683 [FIX] renaming of cugraph-ops symbols (refactoring) Update pr.yaml on top off #3683 [FIX] renaming of cugraph-ops symbols (refactoring) Jul 5, 2023
@naimnv naimnv changed the title Update pr.yaml on top off #3683 [FIX] renaming of cugraph-ops symbols (refactoring) Update pr.yaml on top of #3683 [FIX] renaming of cugraph-ops symbols (refactoring) Jul 5, 2023
@naimnv naimnv self-assigned this Jul 5, 2023
@tingyu66 tingyu66 requested a review from a team as a code owner July 5, 2023 02:48
Copy link
Member

@tingyu66 tingyu66 left a comment

Choose a reason for hiding this comment

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

@naimnv I merged in my fixes originally in #3684 so that python tests will pass.

This PR should supercede #3683 #3684 #3685 upon passing CI checks.

@tingyu66 tingyu66 changed the title Update pr.yaml on top of #3683 [FIX] renaming of cugraph-ops symbols (refactoring) [FIX] Rename cugraph-ops symbols (refactoring) and update GHA workflows to call pytest via python -m pytest Jul 5, 2023
@naimnv naimnv requested a review from MatthiasKohl July 5, 2023 10:41
Copy link
Contributor

@MatthiasKohl MatthiasKohl left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for consolidating the PRs

@naimnv naimnv assigned naimnv and unassigned naimnv Jul 5, 2023
@naimnv naimnv requested a review from jnke2016 July 5, 2023 13:52
Comment on lines +39 to +40
using base_vertex_t = std::decay_t<vertex_t>;
using base_edge_t = std::decay_t<edge_t>;
Copy link
Contributor

Choose a reason for hiding this comment

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

If we require decay here, should we better apply decay at the caller site? vertex_t implies it is a non-const non-volatile value type in our code base, and I think we should better maintain that convention.

Copy link
Contributor

Choose a reason for hiding this comment

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

that makes sense, I don't know about cugraph conventions, so decay would not hurt in case someone does end up calling this with a reference type or const or volatile. It is mainly used for the type checks anyway.
Do you want me to remove this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, yeah, then, I don't care whether we apply decay here or not (I initially thought the caller is also our code, but if the caller is a user, then, I am not sure removing decay here is good or bad).

"cugraph-ops sampling not yet implemented for different node and edge types");

const auto ops_graph = detail::get_graph(graph_view);
return ops::graph::uniform_sample_csc(rng_state,
Copy link
Contributor

Choose a reason for hiding this comment

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

It was csr in the old code, now it is csr, is this intentional?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, see below, this is part of the refactoring

Comment on lines +65 to +66
using base_vertex_t = std::decay_t<vertex_t>;
using base_edge_t = std::decay_t<edge_t>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, if decay is necessary, I think we should apply this in the caller site.

ops::graph::fg_csr<EdgeTypeT> graph;
graph.n_nodes = gview.number_of_vertices();
graph.n_indices = gview.number_of_edges();
ops::graph::csc<EdgeTypeT, NodeTypeT> graph;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to double check. csr to csc here is intentional, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes indeed, part of the refactoring was to align more with general naming conventions

Comment on lines +34 to +35
// FIXME this is sufficient for now, but if there is a fast (cached) way
// of getting max degree, use that instead
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for curiosity, is there any performance benefit in providing a tighter bound for max_in_degree?

Copy link
Contributor

Choose a reason for hiding this comment

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

For neighborhood sampling, no. For other operations in cugraph-ops, yes.

@rlratzel
Copy link
Contributor

rlratzel commented Jul 5, 2023

/merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants