This repository contains the code for our work Graph Filtration Learning which was accepted at ICML'20.
In the following <root_dir>
will be the directory in which you have chosen to do the installation.
-
Install Anaconda from here into
<root_dir>/anaconda3
, i.e., set the prefix accordingly in the installer. -
Activate Anaconda installation:
source <root_dir>/anaconda3/bin/activate
-
Install pytorch via conda
conda install pytorch=1.4.0 torchvision cudatoolkit=<your_cuda_version> -c pytorch
-
Install
pytorch-geometric
and its dependencies following the instructions on its gh-page. -
Install
torchph
viacd <root_dir> git clone -b 'submission_icml2020' --single-branch --depth 1 https://github.com/c-hofer/torchph.git conda develop torchph
-
Clone this repository into
<root_dir>
.
-
Generate the experiment configurations you want using the
write_exp_cfgs_file.ipynb
notebook. It is assumed that the notebook server is started in<root_dir>/graph_filtration_learning
. -
Use the
train.py
script to run the experiments, e.g.,python train.py --cfg_file <my_cfg.json> --output_dir <results/dir/path> --devices 0,1 --max_process_on_device 2
to use cuda device 0 and 1 with at most 2 experiments on each.
Each experiment gets a unique id and its output is written to
<results/dir/path>
as a pickle file. Additionally for each CV run the corresponding trained model is dumped. -
The notebook
results.ipynb
contains some code to browse the results.