GithubHelp home page GithubHelp logo

continual_learning_for_graphs's Introduction

Continual Learning for Graphs

Description

This is a Python library to easily experiment with Deep Graph Networks (DGNs) in a continual learning setting. The repository is adapted from PyDGN

Installation:

(We assume git and Miniconda/Anaconda are installed)

First, make sure gcc 5.2.0 is installed: conda install -c anaconda libgcc=5.2.0. Then, echo $LD_LIBRARY_PATH should always contain :/home/[your user name]/miniconda3/lib. Then run from your terminal the following command:

source install.sh [<your_cuda_version>]

Where <your_cuda_version> is an optional argument that can be either cpu, cu92, cu101, cu102 or cu110 for Pytorch 1.7.0. If you do not provide a cuda version, the script will default to cpu. The script will create a virtual environment named cl_dgn, with all the required packages needed to run our code. Important: do NOT run this command using bash instead of source!

Remember that PyTorch MacOS Binaries dont support CUDA, install from source if CUDA is needed

Usage:

Always preprocess your datasets before launching the experiments

For MNIST,CIFAR10, and OGBG-PPA, we will automatically use the same data splits provided in the literature (see Pytorch Geometric)

MNIST

python build_dataset.py --config-file CONFIGS/config_DATA_MNIST.yml

CIFAR10

python build_dataset.py --config-file CONFIGS/config_DATA_CIFAR10.yml

OGBG-PPA

python build_dataset.py --config-file CONFIGS/config_DATA_OGBG-PPA.yml

Launch an experiment in debug mode (example with OGBG-PPA)

python launch_experiment.py --config-file CONFIGS_CLDGN/config_LWF_Split_GraphSAGE_OGB.yml --splits-folder SPLITS/ --data-splits SPLITS/ogbg_ppa/ogbg_ppa_outer1_inner1.splits --data-root DATA/ --dataset-name ogbg_ppa --dataset-class data.dataset.OGBG --max-cpus 1 --max-gpus 1 --final-training-runs 5 --result-folder RESULTS_OGBG_PPA

To debug your code it is useful to add --debug to the command above. Notice, however, that the graphical interface will not work, as code will be executed sequentially. After debugging, if you need sequential execution, you can use --max-cpus 1 --max-gpus 1 --gpus-per-task [0/1] without the --debug option.

Troubleshooting

See the analogous section in the PyDGN library.

continual_learning_for_graphs's People

Contributors

diningphil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

continual_learning_for_graphs's Issues

Enquiry on paper "Catastrophic Forgetting in Deep Graph Networks: an Introductory Benchmark for Graph Classification"

I recently came across the paper "Catastrophic Forgetting in Deep Graph Networks: an Introductory Benchmark for Graph Classification" and noticed the linked GitHub repository and attempted to run the corresponding experiments.

However, I ran into some issues as I could not find the corresponding config_LWF_Split_GraphSAGE_OGB.yml file mentioned in the readme and would like to check on this?

I also attempted to re-run the baselines using config_Rehearsal_Split_Baseline.yml and config_LWF_Split_Baseline.yml which resulted in 19.80 and 17.43 respectively.
After modifying the config_Rehearsal_Split_Baseline.yml's argument of n_rehearsal_patterns_per_task to 100, I was able to obtain 26.21 and am unable to reach the result of 42.87.

Additionally, when looking at the winner_config.json for the modified config_Rehearsal_Split_Baseline.yml, I noticed that it selected config 2.
However when investigating the config_result.json(s), I noticed that config 2 had an a validation score of ~24.68 while config 4 had a validation score of ~30.03.
May I check if this is potentially an issue due to me running the code with the --debug command line flag?

I then also ran config_Rehearsal_Split_DGNReg.yml using python launch_experiment.py --config-file CONFIGS/config_Rehearsal_Split_DGNReg.yml --splits-folder SPLITS/ --data-splits SPLITS/CIFAR10/CIFAR10_outer1_inner1.splits --data-root DATA/ --dataset-name CIFAR10 --dataset-class data.dataset.GNNBenchmarkDataset --max-cpus 4 --max-gpus 1 --final-training-runs 5 --result-folder RESULTS_CIFAR10_Rehearsal_DGNReg --debug and obtained 33.28 and am unsure on what would need to be modified to achieve the 46.61 value.

Would appreciate any possible guidance on possible adjustments that could be made to better approach the paper's values and would be glad to provide any more details required.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.