-
Notifications
You must be signed in to change notification settings - Fork 320
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
Refactor Python Neighborhood Sample #4988
base: branch-25.04
Are you sure you want to change the base?
Refactor Python Neighborhood Sample #4988
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
return start_list | ||
|
||
|
||
def heterogeneous_uniform_neighbor_sample( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this still have _uniform
in the function name?
h_fan_out=fanout_vals, | ||
num_edge_types=num_edge_types, | ||
with_replacement=with_replacement, | ||
do_expensive_check=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a parameter or at least hardcoded to False
?
if with_biases: | ||
sampling_result_array_dict = pylibcugraph_heterogeneous_biased_neighbor_sample( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the calls exactly the same except for the PLC function itself? If so, you could trim this down quite a bit like this:
if with_biases: | |
sampling_result_array_dict = pylibcugraph_heterogeneous_biased_neighbor_sample( | |
if with_biases: | |
sampling_function = pylibcugraph_heterogeneous_biased_neighbor_sample | |
else: | |
sampling_function = pylibcugraph_heterogeneous_uniform_neighbor_sample |
Then just call it once as
sampling_result_array_dict = sampling_function( ... )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this committed by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this committed by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this committed by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this committed by mistake?
closes #3855