Skip to content

Commit

Permalink
Move NeighborLoader to GNNGraphs (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
aurorarossi authored Nov 14, 2024
1 parent 530457c commit ce34b64
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions GNNGraphs/docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ makedocs(;
"GNNGraph" => "api/gnngraph.md",
"GNNHeteroGraph" => "api/heterograph.md",
"TemporalSnapshotsGNNGraph" => "api/temporalgraph.md",
"Samplers" => "api/samplers.md",
],
]
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```@meta
CurrentModule = GraphNeuralNetworks
CurrentModule = GNNGraphs
```

# Samplers
Expand All @@ -8,7 +8,7 @@ CurrentModule = GraphNeuralNetworks
## Docs

```@autodocs
Modules = [GraphNeuralNetworks]
Modules = [GNNGraphs]
Pages = ["samplers.jl"]
Private = false
```
3 changes: 3 additions & 0 deletions GNNGraphs/src/GNNGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,7 @@ export mldataset2gnngraph

include("deprecations.jl")

include("samplers.jl")
export NeighborLoader

end #module
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion GNNGraphs/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ tests = [
"gnnheterograph",
"temporalsnapshotsgnngraph",
"mldatasets",
"ext/SimpleWeightedGraphs"
"ext/SimpleWeightedGraphs",
"samplers"
]

!CUDA.functional() && @warn("CUDA unavailable, not testing GPU support")
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion GraphNeuralNetworks/docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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",


],
Expand Down
3 changes: 0 additions & 3 deletions GraphNeuralNetworks/src/GraphNeuralNetworks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,4 @@ export GlobalPool,

include("deprecations.jl")

include("samplers.jl")
export NeighborLoader

end

0 comments on commit ce34b64

Please sign in to comment.