From 3a0bf574bfdee1f325b3528e31085f3de600a741 Mon Sep 17 00:00:00 2001 From: jnke2016 Date: Mon, 2 Dec 2024 14:29:00 -0800 Subject: [PATCH] properly handle the case where hop is 0 --- cpp/src/sampling/neighbor_sampling_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/sampling/neighbor_sampling_impl.hpp b/cpp/src/sampling/neighbor_sampling_impl.hpp index d666d2dd28..50732497c3 100644 --- a/cpp/src/sampling/neighbor_sampling_impl.hpp +++ b/cpp/src/sampling/neighbor_sampling_impl.hpp @@ -250,7 +250,7 @@ neighbor_sample_impl(raft::handle_t const& handle, starting_vertex_labels, static_cast(k_level), with_replacement); - } else { + } else if (k_level < 0) { std::tie(srcs, dsts, weights, edge_ids, edge_types, labels) = gather_one_hop_edgelist(handle, modified_graph_view,