Skip to content

Commit

Permalink
Attemp to parallelize in cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
gbg141 committed May 24, 2024
1 parent f69f7a6 commit d57daff
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 0 deletions.
43 changes: 43 additions & 0 deletions hp_scripts/main_exp/simplicial/sccn_hetero.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

# ----Heterophilic datasets----
# datasets=( roman_empire minesweeper )

seeds=(0 3 5 7 9)
datasets=( roman_empire minesweeper )
lrs=(0.01 0.001)
out_channels=(32 64 128)

for seed in ${seeds[*]}
do
for lr in ${lrs[*]}
do
for out_channel in ${out_channels[*]}
do
for dataset in ${datasets[*]}
do
python ../../../topobenchmarkx/train.py \
dataset=$dataset \
model=simplicial/sccn \
model.optimizer.lr=$lr \
model.feature_encoder.out_channels=$out_channel \
model.backbone.n_layers=1,2,3,4 \
model.feature_encoder.proj_dropout=0.25,0.5 \
dataset.parameters.data_seed=$seed \
model.readout.readout_name="NoReadOut,PropagateSignalDown" \
dataset.transforms.graph2simplicial_lifting.signed=True \
dataset.parameters.batch_size=1 \
logger.wandb.project=TopoBenchmarkX_Simplicial \
trainer.max_epochs=1000 \
trainer.min_epochs=50 \
trainer.check_val_every_n_epoch=1 \
callbacks.early_stopping.patience=50 \
tags="[MainExperiment]" \
--multirun &
done
done
done
done



# Final totoal processes: 60
66 changes: 66 additions & 0 deletions hp_scripts/main_exp/simplicial/sccn_tu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@


# ----TU graph datasets----
# MUTAG
# TOTAL processes: 5
seeds=(0 3 5 7 9)

for seed in ${seeds[*]}
do
python ../../../topobenchmarkx/train.py \
dataset=MUTAG \
model=simplicial/sccn \
model.optimizer.lr=0.01,0.001 \
model.feature_encoder.out_channels=32,64,128 \
model.backbone.n_layers=1,2,3,4 \
model.feature_encoder.proj_dropout=0.25,0.5 \
dataset.parameters.data_seed=$seed \
dataset.parameters.batch_size=32,64 \
model.readout.readout_name="NoReadOut,PropagateSignalDown" \
dataset.transforms.graph2simplicial_lifting.signed=True \
trainer.max_epochs=500 \
trainer.min_epochs=50 \
trainer.check_val_every_n_epoch=1 \
logger.wandb.project=TopoBenchmarkX_Simplicial \
callbacks.early_stopping.patience=25 \
tags="[MainExperiment]" \
--multirun &
done


# Train rest of the TU graph datasets (TOTAL processes: 30)
datasets=( 'PROTEINS_TU' 'NCI1' 'NCI109' )
seeds=(0 3 5 7 9)
lrs=(0.01 0.001)

for seed in ${seeds[*]}
do
for lr in ${lrs[*]}
do
for dataset in ${datasets[*]}
do
python ../../../topobenchmarkx/train.py \
dataset=$dataset \
model=simplicial/sccn \
model.optimizer.lr=$lr \
model.feature_encoder.out_channels=32,64,128 \
model.backbone.n_layers=1,2,3,4 \
model.feature_encoder.proj_dropout=0.25,0.5 \
dataset.parameters.data_seed=$seed \
dataset.parameters.batch_size=128,256 \
model.readout.readout_name="NoReadOut,PropagateSignalDown" \
dataset.transforms.graph2simplicial_lifting.signed=True \
logger.wandb.project=TopoBenchmarkX_Simplicial \
trainer.max_epochs=500 \
trainer.min_epochs=50 \
trainer.check_val_every_n_epoch=5 \
callbacks.early_stopping.patience=10 \
tags="[MainExperiment]" \
--multirun &
done
done
done



# Final totoal processes: 35
39 changes: 39 additions & 0 deletions hp_scripts/main_exp/simplicial/sccn_zinc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

# ----Graph regression dataset----
#
# SCCN
seeds=(42 3 5 23 150)
lrs=(0.01 0.001)
out_channels=(32 64 128)

for seed in ${seeds[*]}
do
for lr in ${lrs[*]}
do
for out_channel in ${out_channels[*]}
do
python ../../../topobenchmarkx/train.py \
dataset=ZINC \
seed=$seed \
model=simplicial/sccn \
model.optimizer.lr=$lr \
model.optimizer.weight_decay=0 \
model.feature_encoder.out_channels=$out_channel \
model.backbone.n_layers=2,4 \
model.feature_encoder.proj_dropout=0.25,0.5 \
dataset.parameters.batch_size=128,256 \
model.readout.readout_name="NoReadOut,PropagateSignalDown" \
dataset.transforms.graph2simplicial_lifting.signed=True \
dataset.transforms.one_hot_node_degree_features.degrees_fields=x \
dataset.parameters.data_seed=0 \
logger.wandb.project=TopoBenchmarkX_Simplicial \
trainer.max_epochs=500 \
trainer.min_epochs=50 \
callbacks.early_stopping.min_delta=0.005 \
trainer.check_val_every_n_epoch=5 \
callbacks.early_stopping.patience=10 \
tags="[MainExperiment]" \
--multirun &
done
done
done
18 changes: 18 additions & 0 deletions topobenchmarkx/datasets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
python train.py \
dataset=ZINC \
dataset.transforms.graph2simplicial_lifting.signed=True \
dataset.transforms.one_hot_node_degree_features.degrees_fields=x &

python train.py \
dataset=MUTAG \
dataset.transforms.graph2simplicial_lifting.signed=True &

datasets=( 'PROTEINS_TU' 'NCI1' 'NCI109' 'roman_empire' 'minesweeper')
for dataset in ${datasets[*]}
do
python train.py \
dataset=$dataset \
dataset.transforms.graph2simplicial_lifting.signed=True &
done


0 comments on commit d57daff

Please sign in to comment.