Skip to content

Commit

Permalink
revert file
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarghi-nv committed Dec 12, 2023
1 parent 663febe commit 2a3ee5a
Showing 1 changed file with 45 additions and 51 deletions.
96 changes: 45 additions & 51 deletions python/cugraph/cugraph/sampling/uniform_neighbor_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,24 @@ def uniform_neighbor_sample(
compression: str = "COO",
) -> Union[cudf.DataFrame, Tuple[cudf.DataFrame, cudf.DataFrame]]:
"""
Does neighborhood sampling, which samples nodes from a graph based on the
current node's neighbors, with a corresponding fanout value at each hop.
Does neighborhood sampling, which samples nodes from a graph based on the
current node's neighbors, with a corresponding fanout value at each hop.
Parameters
----------
G : cugraph.Graph
cuGraph graph, which contains connectivity information as dask cudf
edge list dataframe
Parameters
----------
G : cugraph.Graph
cuGraph graph, which contains connectivity information as dask cudf
edge list dataframe
start_list : list or cudf.Series (int32)
a list of starting vertices for sampling
start_list : list or cudf.Series (int32)
a list of starting vertices for sampling
fanout_vals : list (int32)
List of branching out (fan-out) degrees per starting vertex for each
hop level.
fanout_vals : list (int32)
List of branching out (fan-out) degrees per starting vertex for each
hop level.
with_replacement: bool, optional (default=True)
Flag to specify if the random sampling is done with replacement
with_replacement: bool, optional (default=True)
Flag to specify if the random sampling is done with replacement
with_edge_properties: bool, optional (default=False)
Deprecated.
Expand All @@ -104,14 +104,14 @@ def uniform_neighbor_sample(
Flag to specify whether batch ids are present in the start_list
Assumes they are the last column in the start_list dataframe
random_state: int, optional
Random seed to use when making sampling calls.
random_state: int, optional
Random seed to use when making sampling calls.
return_offsets: bool, optional (default=False)
Whether to return the sampling results with batch ids
included as one dataframe, or to instead return two
dataframes, one with sampling results and one with
batch ids and their start offsets.
return_offsets: bool, optional (default=False)
Whether to return the sampling results with batch ids
included as one dataframe, or to instead return two
dataframes, one with sampling results and one with
batch ids and their start offsets.
return_hops: bool, optional (default=True)
Whether to return the sampling results with hop ids
Expand Down Expand Up @@ -162,20 +162,17 @@ def uniform_neighbor_sample(
result : cudf.DataFrame or Tuple[cudf.DataFrame, cudf.DataFrame]
GPU data frame containing multiple cudf.Series
carry_over_sources: bool, optional (default=False)
Whether to carry over previous sources into future hops.
deduplicate_sources: bool, optional (default=False)
Whether to first deduplicate the list of possible sources
from the previous destinations before performing next
hop.
Returns
-------
result : cudf.DataFrame or Tuple[cudf.DataFrame, cudf.DataFrame]
GPU data frame containing multiple cudf.Series
If with_edge_properties=False:
If with_edge_properties=False:
df['sources']: cudf.Series
Contains the source vertices from the sampling result
df['destinations']: cudf.Series
Contains the destination vertices from the sampling result
df['indices']: cudf.Series
Contains the indices (edge weights) from the sampling result
for path reconstruction
If with_edge_properties=True:
If return_offsets=False:
df['sources']: cudf.Series
Contains the source vertices from the sampling result
df['destinations']: cudf.Series
Expand All @@ -197,22 +194,19 @@ def uniform_neighbor_sample(
renumber_df['offsets']: cudf.Series
Contains the batch offsets for the renumber maps
If with_edge_properties=True:
If return_offsets=False:
df['sources']: cudf.Series
Contains the source vertices from the sampling result
df['destinations']: cudf.Series
Contains the destination vertices from the sampling result
df['edge_weight']: cudf.Series
Contains the edge weights from the sampling result
df['edge_id']: cudf.Series
Contains the edge ids from the sampling result
df['edge_type']: cudf.Series
Contains the edge types from the sampling result
df['batch_id']: cudf.Series
Contains the batch ids from the sampling result
df['hop_id']: cudf.Series
Contains the hop ids from the sampling result
If return_offsets=True:
df['sources']: cudf.Series
Contains the source vertices from the sampling result
df['destinations']: cudf.Series
Contains the destination vertices from the sampling result
df['edge_weight']: cudf.Series
Contains the edge weights from the sampling result
df['edge_id']: cudf.Series
Contains the edge ids from the sampling result
df['edge_type']: cudf.Series
Contains the edge types from the sampling result
df['hop_id']: cudf.Series
Contains the hop ids from the sampling result
offsets_df['batch_id']: cudf.Series
Contains the batch ids from the sampling result
Expand Down

0 comments on commit 2a3ee5a

Please sign in to comment.