Skip to content

Commit 2b51334

Browse files
committed
Merge branch 'master' into new-multidocs
2 parents d40a3d4 + 15055d8 commit 2b51334

File tree

22 files changed

+302
-44
lines changed

22 files changed

+302
-44
lines changed

GNNGraphs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GNNGraphs"
22
uuid = "aed8fd31-079b-4b5a-b342-a13352159b8c"
33
authors = ["Carlo Lucibello and contributors"]
4-
version = "1.2.1"
4+
version = "1.3.0"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

GNNGraphs/src/sampling.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ function Graphs.induced_subgraph(graph::GNNGraph, nodes::Vector{Int})
177177

178178
node_map = Dict(node => i for (i, node) in enumerate(nodes))
179179

180+
edge_list = [collect(t) for t in zip(edge_index(graph)[1],edge_index(graph)[2])]
181+
180182
# Collect edges to add
181183
source = Int[]
182184
target = Int[]
@@ -187,8 +189,7 @@ function Graphs.induced_subgraph(graph::GNNGraph, nodes::Vector{Int})
187189
if neighbor in keys(node_map)
188190
push!(target, node_map[node])
189191
push!(source, node_map[neighbor])
190-
191-
eindex = findfirst(x -> x == [neighbor, node], edge_index(graph))
192+
eindex = findfirst(x -> x == [neighbor, node], edge_list)
192193
push!(eindices, eindex)
193194
end
194195
end

GNNlib/docs/src/messagepassing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function (l::GCN)(g::GNNGraph, x::AbstractMatrix{T}) where T
134134
end
135135
```
136136

137-
See the `GATConv` implementation [here](https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/src/layers/conv.jl) for a more complex example.
137+
See the `GATConv` implementation [here](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/blob/master/src/layers/conv.jl) for a more complex example.
138138

139139

140140
## Built-in message functions

GraphNeuralNetworks/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
name = "GraphNeuralNetworks"
22
uuid = "cffab07f-9bc2-4db1-8861-388f63bf7694"
33
authors = ["Carlo Lucibello and contributors"]
4-
version = "0.6.21"
4+
version = "0.6.22"
55

66
[deps]
77
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
88
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
99
Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
1010
GNNGraphs = "aed8fd31-079b-4b5a-b342-a13352159b8c"
1111
GNNlib = "a6a84749-d869-43f8-aacc-be26a1996e48"
12+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
1213
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1314
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
1415
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
@@ -28,6 +29,7 @@ CUDA = "4, 5"
2829
ChainRulesCore = "1"
2930
Flux = "0.14"
3031
Functors = "0.4.1"
32+
Graphs = "1.12"
3133
GNNGraphs = "1.0"
3234
GNNlib = "0.2"
3335
LinearAlgebra = "1"

GraphNeuralNetworks/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<img align="right" width="300px" src="https://raw.githubusercontent.com/CarloLucibello/GraphNeuralNetworks.jl/master/docs/src/assets/logo.svg">
1+
<img align="right" width="300px" src="https://raw.githubusercontent.com/JuliaGraphs/GraphNeuralNetworks.jl/master/docs/src/assets/logo.svg">
22

33

44
# GraphNeuralNetworks.jl
55

6-
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://CarloLucibello.github.io/GraphNeuralNetworks.jl/stable)
7-
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://CarloLucibello.github.io/GraphNeuralNetworks.jl/dev)
8-
![](https://github.com/CarloLucibello/GraphNeuralNetworks.jl/actions/workflows/ci.yml/badge.svg)
9-
[![codecov](https://codecov.io/gh/CarloLucibello/GraphNeuralNetworks.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/CarloLucibello/GraphNeuralNetworks.jl)
6+
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaGraphs.github.io/GraphNeuralNetworks.jl/stable)
7+
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaGraphs.github.io/GraphNeuralNetworks.jl/dev)
8+
![](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/actions/workflows/ci.yml/badge.svg)
9+
[![codecov](https://codecov.io/gh/JuliaGraphs/GraphNeuralNetworks.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaGraphs/GraphNeuralNetworks.jl)
1010

1111

1212
GraphNeuralNetworks.jl is a graph neural network library written in Julia and based on the deep learning framework [Flux.jl](https://github.com/FluxML/Flux.jl).
@@ -18,7 +18,7 @@ Among its features:
1818
* Easy to define custom layers.
1919
* CUDA support.
2020
* Integration with [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl).
21-
* [Examples](https://github.com/CarloLucibello/GraphNeuralNetworks.jl/tree/master/examples) of node, edge, and graph level machine learning tasks.
21+
* [Examples](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/tree/master/examples) of node, edge, and graph level machine learning tasks.
2222
* Heterogeneous and temporal graphs.
2323

2424
## Installation
@@ -31,7 +31,7 @@ pkg> add GraphNeuralNetworks
3131

3232
## Usage
3333

34-
Usage examples can be found in the [examples](https://github.com/CarloLucibello/GraphNeuralNetworks.jl/tree/master/examples) and in the [notebooks](https://github.com/CarloLucibello/GraphNeuralNetworks.jl/tree/master/notebooks) folder. Also, make sure to read the [documentation](https://CarloLucibello.github.io/GraphNeuralNetworks.jl/dev) for a comprehensive introduction to the library.
34+
Usage examples can be found in the [examples](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/tree/master/examples) and in the [notebooks](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/tree/master/notebooks) folder. Also, make sure to read the [documentation](https://JuliaGraphs.github.io/GraphNeuralNetworks.jl/dev) for a comprehensive introduction to the library.
3535

3636

3737
## Citing
@@ -43,7 +43,7 @@ If you use GraphNeuralNetworks.jl in a scientific publication, we would apprecia
4343
author = {Carlo Lucibello and other contributors},
4444
title = {GraphNeuralNetworks.jl: a geometric deep learning library for the Julia programming language},
4545
year = 2021,
46-
url = {https://github.com/CarloLucibello/GraphNeuralNetworks.jl}
46+
url = {https://github.com/JuliaGraphs/GraphNeuralNetworks.jl}
4747
}
4848
```
4949

GraphNeuralNetworks/docs/make.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ makedocs(;
2525
"Home" => "index.md",
2626
"Developer guide" => "dev.md",
2727
"Google Summer of Code" => "gsoc.md",
28-
29-
3028
],
3129
"GraphNeuralNetworks.jl" =>[
3230
"Home" => "home.md",
@@ -38,7 +36,8 @@ makedocs(;
3836
"Convolutional layers" => "api/conv.md",
3937
"Pooling layers" => "api/pool.md",
4038
"Temporal Convolutional layers" => "api/temporalconv.md",
41-
"Hetero Convolutional layers" => "api/heteroconv.md"
39+
"Hetero Convolutional layers" => "api/heteroconv.md",
40+
"Samplers" => "api/samplers.md",
4241

4342

4443
],
@@ -49,4 +48,4 @@ makedocs(;
4948

5049

5150

52-
deploydocs(;repo = "https://github.com/CarloLucibello/GraphNeuralNetworks.jl.git", dirname= "GraphNeuralNetworks")
51+
deploydocs(;repo = "https://github.com/CarloLucibello/GraphNeuralNetworks.jl.git", dirname= "GraphNeuralNetworks")
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```@meta
2+
CurrentModule = GraphNeuralNetworks
3+
```
4+
5+
# Samplers
6+
7+
8+
## Docs
9+
10+
```@autodocs
11+
Modules = [GraphNeuralNetworks]
12+
Pages = ["samplers.jl"]
13+
Private = false
14+
```
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Datasets
2+
3+
GraphNeuralNetworks.jl doesn't come with its own datasets, but leverages those available in the Julia (and non-Julia) ecosystem. In particular, the [examples in the GraphNeuralNetworks.jl repository](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/tree/master/examples) make use of the [MLDatasets.jl](https://github.com/JuliaML/MLDatasets.jl) package. There you will find common graph datasets such as Cora, PubMed, Citeseer, TUDataset and [many others](https://juliaml.github.io/MLDatasets.jl/dev/datasets/graphs/).
4+
5+
GraphNeuralNetworks.jl provides the [`mldataset2gnngraph`](@ref) method for interfacing with MLDatasets.jl.
6+
7+
```@docs
8+
mldataset2gnngraph
9+
```

GraphNeuralNetworks/docs/src/dev.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ julia> compare(dfpr, dfmaster)
8080

8181
Tutorials in GraphNeuralNetworks.jl are written in Pluto and rendered using [DemoCards.jl](https://github.com/JuliaDocs/DemoCards.jl) and [PlutoStaticHTML.jl](https://github.com/rikhuijzer/PlutoStaticHTML.jl). Rendering a Pluto notebook is time and resource-consuming, especially in a CI environment. So we use the [caching functionality](https://huijzer.xyz/PlutoStaticHTML.jl/dev/#Caching) provided by PlutoStaticHTML.jl to reduce CI time.
8282

83-
If you are contributing a new tutorial or making changes to the existing notebook, generate the docs locally before committing/pushing. For caching to work, the cache environment(your local) and the documenter CI should have the same Julia version (e.g. "v1.9.1", also the patch number must match). So use the [documenter CI Julia version](https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/.github/workflows/docs.yml#L17) for generating docs locally.
83+
If you are contributing a new tutorial or making changes to the existing notebook, generate the docs locally before committing/pushing. For caching to work, the cache environment(your local) and the documenter CI should have the same Julia version (e.g. "v1.9.1", also the patch number must match). So use the [documenter CI Julia version](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/blob/master/.github/workflows/docs.yml#L17) for generating docs locally.
8484

8585
```console
8686
julia --version # check julia version before generating docs
@@ -95,6 +95,6 @@ During the doc generation process, DemoCards.jl stores the cache notebooks in do
9595
git add docs/pluto_output # add generated cache
9696
```
9797

98-
Check the [documenter CI logs](https://github.com/CarloLucibello/GraphNeuralNetworks.jl/actions/workflows/docs.yml) to ensure that it used the local cache:
98+
Check the [documenter CI logs](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/actions/workflows/docs.yml) to ensure that it used the local cache:
9999

100100
![](https://user-images.githubusercontent.com/55111154/210061301-c84b7274-9e66-46fd-b272-d45b1c681d00.png)
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# GraphNeuralNetworks Monorepo
22

3-
This repository is a monorepo that contains all the code for the GraphNeuralNetworks project. The project is organized as a monorepo to facilitate code sharing and reusability across different components of the project. The monorepo contains the following packages:
3+
This is the documentation page for [GraphNeuralNetworks.jl](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl), a graph neural network library written in Julia and based on the deep learning framework [Flux.jl](https://github.com/FluxML/Flux.jl).
4+
GraphNeuralNetworks.jl is largely inspired by [PyTorch Geometric](https://pytorch-geometric.readthedocs.io/en/latest/), [Deep Graph Library](https://docs.dgl.ai/),
5+
and [GeometricFlux.jl](https://fluxml.ai/GeometricFlux.jl/stable/).
46

57
- `GraphNeuralNetwork.jl`: Package that contains stateful graph convolutional layers based on the machine learning framework [Flux.jl](https://fluxml.ai/Flux.jl/stable/). This is fronted package for Flux users. It depends on GNNlib.jl, GNNGraphs.jl, and Flux.jl packages.
68

7-
- `GNNLux.jl`: Package that contains stateless graph convolutional layers based on the machine learning framework [Lux.jl](https://lux.csail.mit.edu/stable/). This is fronted package for Lux users. It depends on GNNlib.jl, GNNGraphs.jl, and Lux.jl packages.
8-
9-
- `GNNlib.jl`: Package that contains the core graph neural network layers and utilities. It depends on GNNGraphs.jl and GNNlib.jl packages and serves for code base for GraphNeuralNetwork.jl and GNNLux.jl packages.
10-
11-
- `GNNGraphs.jl`: Package that contains the graph data structures and helper functions for working with graph data. It depends on Graphs.jl package.
12-
13-
Here is a schema of the dependencies between the packages:
14-
15-
![Monorepo schema](assets/schema.png)
9+
* Implements common graph convolutional layers.
10+
* Supports computations on batched graphs.
11+
* Easy to define custom layers.
12+
* CUDA support.
13+
* Integration with [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl).
14+
* [Examples](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/tree/master/examples) of node, edge, and graph level machine learning tasks.
1615

1716

1817

1918

19+
Usage examples on real datasets can be found in the [examples](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/tree/master/examples) folder.
2020

0 commit comments

Comments
 (0)