Skip to content
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

Move NeighborLoader to GNNGraphs #522

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading