Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
84c9206
[2nd Edition][Chapter 1] Introduce poetry and update dependencies
deusebio Dec 18, 2023
53597df
[2nd Edition][Chapter 2] Introduce poetry and update dependencies
deusebio Dec 19, 2023
8cfdee7
[2nd Edition][Chapter 3] Introduce poetry
deusebio Dec 19, 2023
0c6a0e6
[MISC] Small notebook refactoring
deusebio Dec 23, 2023
3e10932
[MISC] Adding dockerfile and tests
deusebio Dec 23, 2023
e6cf23c
[MISC] CI/CD pipeline
deusebio Jan 2, 2024
ceee912
[2nd Edition][Chapter 6] Introduce Poetry
deusebio Jun 25, 2024
62041d9
[2nd Edition][Chapter 3] (fix) broken dataset download
deusebio Jun 26, 2024
f7d7006
[2nd Edition][Chapter 5] Introduce Poetry
deusebio Aug 16, 2024
77bea64
[MISC] Split images (#7)
deusebio Oct 1, 2024
56fcc7e
[2nd Edition][Chapter 5] (fix) Various stability fixes
deusebio Oct 1, 2024
269e73d
[2nd Edition][New Chapter] Introduction on Neural Networks] Introduce…
deusebio Oct 3, 2024
5ab62e5
[2nd Edition][Chapter 4] Introduce Poetry (#8)
deusebio Oct 11, 2024
23cc666
[Chapter 6] Adding pyg support (#9)
deusebio Oct 14, 2024
8c716d4
[Chapter02] Adding CNN models to Image Classification
deusebio Oct 16, 2024
8e21c5e
[MISC] Restructuring files based on chapter for new edition
deusebio Oct 16, 2024
513387b
[Chapter4] Restyling figures for shallow embeddings (#12)
deusebio Oct 24, 2024
069857d
[2nd Edition][Chapter 8] Introduce Poetry (#13)
deusebio Nov 24, 2024
a9923b9
[2nd Edition][Chapter 9] Introduce Poetry (#22)
deusebio Nov 25, 2024
e979afe
[MISC] setting package-mode to false to prevent installation warning …
deusebio Nov 25, 2024
e6e7024
bug: allow data dir specification (#21)
deusebio Nov 25, 2024
e8447cf
[MISC] Remove pip install commands from notebooks (#25)
deusebio Jan 5, 2025
e5cd803
[Chapter05] Adding Planetoid notebook (#32)
deusebio Jan 18, 2025
e4705c2
[Issue #26] Enforce probability normalization in LabelPropagation and…
deusebio Jan 18, 2025
af94672
[MISC] Code Review for Chap8 (#30)
deusebio Jan 18, 2025
9d6dd08
[2nd Edition][Chapter 10] Introduce Poetry (#33)
deusebio Jan 18, 2025
19ddaec
[Chapter9] Code review (#34)
deusebio Apr 5, 2025
d837f32
[Chapter10] Code Review (#36)
deusebio Apr 5, 2025
3a380d1
[Chapter03] Fix typo in edge splitting (#42)
deusebio Jun 16, 2025
914c5af
[Chapter06] Graph Similarity with GNN (#38)
deusebio Jun 16, 2025
4dd8884
[Chapter12] LLM and Graphs (#39)
deusebio Jul 10, 2025
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
139 changes: 139 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Build Image

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
workflow_call:

jobs:
build:
strategy:
fail-fast: false
max-parallel: 5
matrix:
chapter:
- name: chap1
folder: Chapter01
- name: chap2
folder: Chapter02
- name: chap3
folder: Chapter03
- name: chap4
folder: Chapter04
- name: chap5
folder: Chapter05
- name: chap6
folder: Chapter06
- name: chap7
folder: Chapter07
- name: chap8
folder: Chapter08
- name: chap9
folder: Chapter09
- name: chap10
folder: Chapter10
- name: chap12
folder: Chapter12
runs-on: ubuntu-22.04
name: Image ${{ matrix.chapter.name }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: (GitHub hosted) Free up disk space
shell: bash
run: |
printf '\nDisk usage before cleanup\n'
df --human-readable
# Based on https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
rm -r /usr/share/dotnet
rm -r /opt/hostedtoolcache/
printf '\nDisk usage after cleanup\n'
df --human-readable

- name: Build Image
id: build
run: |
cd docker
docker build . --target ${{ matrix.chapter.name }} \
--build-arg branch=${{ steps.extract_branch.outputs.branch }} \
-t graph-machine-learning:latest --no-cache

- name: Test Image
id: tests
env:
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }}
KAGGLE_TOKEN: ${{ secrets.KAGGLE_TOKEN }}
run: |

docker network create my-network

# Start Neo4j and JanusGraph if we are testing chapter 10
if [ "${{ matrix.chapter.name }}" == "chap10" ];
then
docker run --rm --detach --name janusgraph \
--publish=8182:8182 \
janusgraph/janusgraph:1.1.0
docker network connect my-network janusgraph

docker run --rm --detach --name neo4j \
--publish=7474:7474 --publish=7687:7687 \
--user="$(id -u):$(id -g)" \
--env NEO4J_AUTH=none \
--env NEO4J_PLUGINS='["graph-data-science"]' \
neo4j:5.26.0
docker network connect my-network neo4j
fi

# Start Neo4j if we are testing chapter 13
if [ "${{ matrix.chapter.name }}" == "chap12" ];
then
docker run --rm --detach --name neo4j \
--publish=7474:7474 --publish=7687:7687 \
--user="$(id -u):$(id -g)" \
--env NEO4J_AUTH=none \
--env NEO4J_PLUGINS='["apoc","apoc-extended"]' \
--env NEO4J_apoc_export_file_enabled=true \
--env NEO4J_apoc_import_file_enabled=true \
--env NEO4J_apoc_import_file_use__neo4j_config=true \
neo4j:5.26.0
docker network connect my-network neo4j

docker run --rm --detach --name ollama \
--publish=11434:11434 \
--volume olama:/root/.ollama \
ollama/ollama:0.6.4
docker network connect my-network ollama
fi


mkdir -p data
chmod -R 777 data
docker run \
--rm --detach -v "$(pwd)/data:/data" \
--name graph-machine-learning-box \
--env KAGGLE_USERNAME=${KAGGLE_USERNAME} \
--env KAGGLE_KEY=${KAGGLE_TOKEN} \
--env NEO4J_HOST=neo4j \
--env JANUSGRAPH_HOST=janusgraph \
--env OLLAMA_HOST=ollama \
graph-machine-learning:latest
docker network connect my-network graph-machine-learning-box

# Run tests
cd docker

./tests.sh ${{ matrix.chapter.folder }}

- name: tmate session if tests fail
if: failure() && github.event_name == 'workflow_dispatch'
uses: mxschmitt/action-tmate@v3

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.ipynb_checkpoints
__pycache__
337 changes: 265 additions & 72 deletions Chapter01/01_Introduction_Networkx.ipynb

Large diffs are not rendered by default.

304 changes: 89 additions & 215 deletions Chapter01/02_Graph_metrics.ipynb

Large diffs are not rendered by default.

280 changes: 113 additions & 167 deletions Chapter01/03_Graphs_Benchmarks.ipynb

Large diffs are not rendered by default.

Loading
Loading