Skip to content

Commit

Permalink
add 'do_expensive_check'
Browse files Browse the repository at this point in the history
  • Loading branch information
jnke2016 committed Jan 24, 2024
1 parent 1d39ec6 commit c4d9580
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/cugraph/cugraph/structure/symmetrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def symmetrize(
value_col_name=None,
multi=False,
symmetrize=True,
do_expensive_check = False,
):
"""
Take a dataframe of source destination pairs along with associated
Expand Down Expand Up @@ -248,8 +249,9 @@ def symmetrize(
if "edge_id" in input_df.columns and symmetrize:
raise ValueError("Edge IDs are not supported on undirected graphs")

csg.null_check(input_df[source_col_name])
csg.null_check(input_df[dest_col_name])
if do_expensive_check: # FIXME: Optimize this check as it is currently expensive
csg.null_check(input_df[source_col_name])
csg.null_check(input_df[dest_col_name])

if isinstance(input_df, dask_cudf.DataFrame):
output_df = symmetrize_ddf(
Expand Down

0 comments on commit c4d9580

Please sign in to comment.