Skip to content

Commit

Permalink
add random state argumment and update copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
jnke2016 committed Dec 31, 2024
1 parent bb77237 commit 618fe76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/cugraph/cugraph/sampling/node2vec_random_walks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2024, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
7 changes: 5 additions & 2 deletions python/cugraph/cugraph/sampling/uniform_random_walks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -20,14 +20,14 @@

from cugraph.structure import Graph

import warnings
from typing import Union, Tuple


def uniform_random_walks(
G: Graph,
start_vertices: Union[int, list, cudf.Series, cudf.DataFrame] = None,
max_depth: int = None,
random_state: int = None,
) -> Tuple[cudf.Series, cudf.Series, Union[None, int, cudf.Series]]:
"""
Compute uniform random walks for each nodes in 'start_vertices'.
Expand All @@ -50,6 +50,9 @@ def uniform_random_walks(
The max depth is relative to the number of edges hence the vertex_paths size
is max_depth + 1. For instance, a 'max_depth' of 2 with only one seed will
result in a vertex_path of size 3.
random_state: int, optional
Random seed to use when making sampling calls.
Returns
Expand Down

0 comments on commit 618fe76

Please sign in to comment.