Skip to content

Commit ce34b64

Browse files
authored
Move NeighborLoader to GNNGraphs (#522)
1 parent 530457c commit ce34b64

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

GNNGraphs/docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ makedocs(;
2222
"GNNGraph" => "api/gnngraph.md",
2323
"GNNHeteroGraph" => "api/heterograph.md",
2424
"TemporalSnapshotsGNNGraph" => "api/temporalgraph.md",
25+
"Samplers" => "api/samplers.md",
2526
],
2627
]
2728
)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```@meta
2-
CurrentModule = GraphNeuralNetworks
2+
CurrentModule = GNNGraphs
33
```
44

55
# Samplers
@@ -8,7 +8,7 @@ CurrentModule = GraphNeuralNetworks
88
## Docs
99

1010
```@autodocs
11-
Modules = [GraphNeuralNetworks]
11+
Modules = [GNNGraphs]
1212
Pages = ["samplers.jl"]
1313
Private = false
1414
```

GNNGraphs/src/GNNGraphs.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,7 @@ export mldataset2gnngraph
113113

114114
include("deprecations.jl")
115115

116+
include("samplers.jl")
117+
export NeighborLoader
118+
116119
end #module

GraphNeuralNetworks/src/samplers.jl renamed to GNNGraphs/src/samplers.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
44
A data structure for sampling neighbors from a graph for training Graph Neural Networks (GNNs).
55
It supports multi-layer sampling of neighbors for a batch of input nodes, useful for mini-batch training
6-
originally introduced in "Inductive Representation Learning on Large Graphs" paper.
7-
[see https://arxiv.org/abs/1706.02216]
6+
originally introduced in ["Inductive Representation Learning on Large Graphs"}(https://arxiv.org/abs/1706.02216) paper.
87
98
# Fields
109
- `graph::GNNGraph`: The input graph.
@@ -21,6 +20,7 @@ julia> batch_counter = 0
2120
julia> for mini_batch_gnn in loader
2221
batch_counter += 1
2322
println("Batch ", batch_counter, ": Nodes in mini-batch graph: ", nv(mini_batch_gnn))
23+
end
2424
```
2525
"""
2626
struct NeighborLoader

GNNGraphs/test/runtests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ tests = [
3737
"gnnheterograph",
3838
"temporalsnapshotsgnngraph",
3939
"mldatasets",
40-
"ext/SimpleWeightedGraphs"
40+
"ext/SimpleWeightedGraphs",
41+
"samplers"
4142
]
4243

4344
!CUDA.functional() && @warn("CUDA unavailable, not testing GPU support")
File renamed without changes.

GraphNeuralNetworks/docs/make.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ makedocs(;
3737
"Pooling layers" => "api/pool.md",
3838
"Temporal Convolutional layers" => "api/temporalconv.md",
3939
"Hetero Convolutional layers" => "api/heteroconv.md",
40-
"Samplers" => "api/samplers.md",
4140

4241

4342
],

GraphNeuralNetworks/src/GraphNeuralNetworks.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,4 @@ export GlobalPool,
6767

6868
include("deprecations.jl")
6969

70-
include("samplers.jl")
71-
export NeighborLoader
72-
7370
end

0 commit comments

Comments
 (0)