1
1
from __future__ import annotations
2
2
3
3
from abc import ABC , abstractmethod
4
- from typing import Any , List , Optional
4
+ from typing import List , Optional
5
5
6
6
from graphdatascience import Graph
7
7
from graphdatascience .procedure_surface .api .base_result import BaseResult
@@ -27,8 +27,8 @@ def rwr(
27
27
sudo : Optional [bool ] = None ,
28
28
log_progress : Optional [bool ] = None ,
29
29
username : Optional [str ] = None ,
30
- concurrency : Optional [Any ] = None ,
31
- job_id : Optional [Any ] = None ,
30
+ concurrency : Optional [int ] = None ,
31
+ job_id : Optional [str ] = None ,
32
32
) -> GraphSamplingResult :
33
33
"""
34
34
Computes a set of Random Walks with Restart (RWR) for the given graph and stores the result as a new graph in the catalog.
@@ -59,9 +59,9 @@ def rwr(
59
59
The name of the property on relationships to use as weights during
60
60
the random walk. If not specified, the relationships are treated as
61
61
unweighted.
62
- relationship_types : Optional[List[ str]], default=None
62
+ relationship_types : list of str, optional
63
63
The relationship types used to select relationships for this algorithm run.
64
- node_labels : Optional[List[ str]], default=None
64
+ node_labels : list of str, optional
65
65
The node labels used to select nodes for this algorithm run.
66
66
sudo : bool, optional
67
67
Override memory estimation limits. Use with caution as this can lead to
@@ -70,9 +70,9 @@ def rwr(
70
70
If True, logs the progress of the computation.
71
71
username : str, optional
72
72
The username to attribute the procedure run to
73
- concurrency : Any , optional
73
+ concurrency : int , optional
74
74
The number of concurrent threads used for the algorithm execution.
75
- job_id : Any , optional
75
+ job_id : str , optional
76
76
An identifier for the job that can be used for monitoring and cancellation
77
77
78
78
Returns
@@ -98,8 +98,8 @@ def cnarw(
98
98
sudo : Optional [bool ] = None ,
99
99
log_progress : Optional [bool ] = None ,
100
100
username : Optional [str ] = None ,
101
- concurrency : Optional [Any ] = None ,
102
- job_id : Optional [Any ] = None ,
101
+ concurrency : Optional [int ] = None ,
102
+ job_id : Optional [str ] = None ,
103
103
) -> GraphSamplingResult :
104
104
"""
105
105
Computes a set of Random Walks with Restart (RWR) for the given graph and stores the result as a new graph in the catalog.
@@ -130,9 +130,9 @@ def cnarw(
130
130
The name of the property on relationships to use as weights during
131
131
the random walk. If not specified, the relationships are treated as
132
132
unweighted.
133
- relationship_types : Optional[List[ str]], default=None
133
+ relationship_types : list of str, optional
134
134
The relationship types used to select relationships for this algorithm run.
135
- node_labels : Optional[List[ str]], default=None
135
+ node_labels : list of str, optional
136
136
The node labels used to select nodes for this algorithm run.
137
137
sudo : bool, optional
138
138
Override memory estimation limits. Use with caution as this can lead to
@@ -141,9 +141,9 @@ def cnarw(
141
141
If True, logs the progress of the computation.
142
142
username : str, optional
143
143
The username to attribute the procedure run to
144
- concurrency : Any , optional
144
+ concurrency : int , optional
145
145
The number of concurrent threads used for the algorithm execution.
146
- job_id : Any , optional
146
+ job_id : str , optional
147
147
An identifier for the job that can be used for monitoring and cancellation
148
148
149
149
Returns
0 commit comments