diff --git a/GNNGraphs/docs/make.jl b/GNNGraphs/docs/make.jl index 2fc0748c8..0cc6c081d 100644 --- a/GNNGraphs/docs/make.jl +++ b/GNNGraphs/docs/make.jl @@ -22,6 +22,7 @@ makedocs(; "GNNGraph" => "api/gnngraph.md", "GNNHeteroGraph" => "api/heterograph.md", "TemporalSnapshotsGNNGraph" => "api/temporalgraph.md", + "Samplers" => "api/samplers.md", ], ] ) diff --git a/GraphNeuralNetworks/docs/src/api/samplers.md b/GNNGraphs/docs/src/api/samplers.md similarity index 58% rename from GraphNeuralNetworks/docs/src/api/samplers.md rename to GNNGraphs/docs/src/api/samplers.md index f4285562c..0f3a7e56b 100644 --- a/GraphNeuralNetworks/docs/src/api/samplers.md +++ b/GNNGraphs/docs/src/api/samplers.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = GraphNeuralNetworks +CurrentModule = GNNGraphs ``` # Samplers @@ -8,7 +8,7 @@ CurrentModule = GraphNeuralNetworks ## Docs ```@autodocs -Modules = [GraphNeuralNetworks] +Modules = [GNNGraphs] Pages = ["samplers.jl"] Private = false ``` diff --git a/GNNGraphs/src/GNNGraphs.jl b/GNNGraphs/src/GNNGraphs.jl index cd1848b28..5a5b5fe66 100644 --- a/GNNGraphs/src/GNNGraphs.jl +++ b/GNNGraphs/src/GNNGraphs.jl @@ -113,4 +113,7 @@ export mldataset2gnngraph include("deprecations.jl") +include("samplers.jl") +export NeighborLoader + end #module diff --git a/GraphNeuralNetworks/src/samplers.jl b/GNNGraphs/src/samplers.jl similarity index 97% rename from GraphNeuralNetworks/src/samplers.jl rename to GNNGraphs/src/samplers.jl index 5c06c1681..44bbe1480 100644 --- a/GraphNeuralNetworks/src/samplers.jl +++ b/GNNGraphs/src/samplers.jl @@ -3,8 +3,7 @@ A data structure for sampling neighbors from a graph for training Graph Neural Networks (GNNs). It supports multi-layer sampling of neighbors for a batch of input nodes, useful for mini-batch training -originally introduced in "Inductive Representation Learning on Large Graphs" paper. -[see https://arxiv.org/abs/1706.02216] +originally introduced in ["Inductive Representation Learning on Large Graphs"}(https://arxiv.org/abs/1706.02216) paper. # Fields - `graph::GNNGraph`: The input graph. @@ -21,6 +20,7 @@ julia> batch_counter = 0 julia> for mini_batch_gnn in loader batch_counter += 1 println("Batch ", batch_counter, ": Nodes in mini-batch graph: ", nv(mini_batch_gnn)) + end ``` """ struct NeighborLoader diff --git a/GNNGraphs/test/runtests.jl b/GNNGraphs/test/runtests.jl index 0c648d2a4..147d3fccc 100644 --- a/GNNGraphs/test/runtests.jl +++ b/GNNGraphs/test/runtests.jl @@ -37,7 +37,8 @@ tests = [ "gnnheterograph", "temporalsnapshotsgnngraph", "mldatasets", - "ext/SimpleWeightedGraphs" + "ext/SimpleWeightedGraphs", + "samplers" ] !CUDA.functional() && @warn("CUDA unavailable, not testing GPU support") diff --git a/GraphNeuralNetworks/test/samplers.jl b/GNNGraphs/test/samplers.jl similarity index 100% rename from GraphNeuralNetworks/test/samplers.jl rename to GNNGraphs/test/samplers.jl diff --git a/GraphNeuralNetworks/docs/make.jl b/GraphNeuralNetworks/docs/make.jl index 56af7ce42..8091ed407 100644 --- a/GraphNeuralNetworks/docs/make.jl +++ b/GraphNeuralNetworks/docs/make.jl @@ -37,7 +37,6 @@ makedocs(; "Pooling layers" => "api/pool.md", "Temporal Convolutional layers" => "api/temporalconv.md", "Hetero Convolutional layers" => "api/heteroconv.md", - "Samplers" => "api/samplers.md", ], diff --git a/GraphNeuralNetworks/src/GraphNeuralNetworks.jl b/GraphNeuralNetworks/src/GraphNeuralNetworks.jl index 9ac46e8b1..fd1c77767 100644 --- a/GraphNeuralNetworks/src/GraphNeuralNetworks.jl +++ b/GraphNeuralNetworks/src/GraphNeuralNetworks.jl @@ -67,7 +67,4 @@ export GlobalPool, include("deprecations.jl") -include("samplers.jl") -export NeighborLoader - end