Skip to content
Tibor Boglár edited this page Mar 14, 2021 · 21 revisions

Installation

# Clone git repo && create a new env with required libraries
git clone https://github.com/hpi-sam/GNN-SpaceTimeGraphs.git
cd GNN-SpaceTimeGraphs
conda env create -f environment.yml
conda activate gnn-env

# Download the metr-la and pems-bay data from 
# https://drive.google.com/file/d/1wD-mHlqAb2mtHOe_68fZvDh1LpDegMMq/view?usp=sharing
export fileid=1pAGRfzMx6K9WWsfDcD1NMbIif0T0saFC
export filename=data/metr_la/metr-la.h5
wget -O $filename 'https://drive.google.com/uc?export=download&id='$fileid

export fileid=1wD-mHlqAb2mtHOe_68fZvDh1LpDegMMq/
export filename=data/pems_bay/pems-bay.h5
wget -O $filename 'https://drive.google.com/uc?export=download&id='$fileid

# Run utils script to process the data that is going to be used
python gnn/utils.py --output_dir=data/metr_la --traffic_df_filename=data/metr_la/metr-la.h5 --sts=True
python gnn/utils.py --output_dir=data/metr_la --traffic_df_filename=data/metr_la/metr-la.h5
python gnn/utils.py --output_dir=data/metr_la --traffic_df_filename=data/pems_bay/pems-bay.h5 --sts=True
python gnn/utils.py --output_dir=data/metr_la --traffic_df_filename=data/pems_bay/pems-bay.h5

Now you can train a model by calling run.py

From the GNN-SpaceTimeGraphs folder, run:

python gnn/train.py -c configs/p3d.yml --toy_data
Clone this wiki locally