Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,15 @@ dmypy.json

# Results folders
**/results/
**/data
**/wandb

# Log folders
**/log/

# Mac OS
.DS_Store
.DS_Store

EEGNet_BNCI2014001_*
ShallowConvNet_BNCI2014001_hopt*
finetune_*
11 changes: 9 additions & 2 deletions benchmarks/MOABB/hparams/MotorImagery/BNCI2014001/EEGNet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 10 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 862 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.0001 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "BNCI2014001"
prefix_name: 'EEGNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 1 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 881 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.001 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "BNCI2014001"
prefix_name: 'ShallowNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
11 changes: 9 additions & 2 deletions benchmarks/MOABB/hparams/MotorImagery/BNCI2014004/EEGNet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 2 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 796 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.0001 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "BNCI2014004"
prefix_name: 'EEGNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 11 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 262 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.005 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "BNCI2014004"
prefix_name: 'ShallowNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
11 changes: 9 additions & 2 deletions benchmarks/MOABB/hparams/MotorImagery/BNCI2015001/EEGNet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 12 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 760 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.001 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "BNCI2015001"
prefix_name: 'EEGNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 9 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 976 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.001 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "BNCI2015001"
prefix_name: 'ShallowNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
11 changes: 9 additions & 2 deletions benchmarks/MOABB/hparams/MotorImagery/Lee2019_MI/EEGNet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 15 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 821 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.001 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "Lee2019_MI"
prefix_name: 'EEGNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 12 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 922 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.001 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "Lee2019_MI"
prefix_name: 'ShallowNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
11 changes: 9 additions & 2 deletions benchmarks/MOABB/hparams/MotorImagery/Zhou2016/EEGNet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 10 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 741 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.001 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "Zhou2016"
prefix_name: 'EEGNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ cm: !name:sklearn.metrics.confusion_matrix
metrics:
f1: !ref <f1>
acc: !ref <acc>
cm: !ref <cm>
# cm: !ref <cm>
# TRAINING HPARS
n_train_examples: 100 # it will be replaced in the train script
# checkpoints to average
avg_models: 13 # @orion_step1: --avg_models~"uniform(1, 15,discrete=True)"
number_of_epochs: 955 # @orion_step1: --number_of_epochs~"uniform(250, 1000, discrete=True)"
number_of_epochs: 100
lr: 0.001 # @orion_step1: --lr~"choices([0.01, 0.005, 0.001, 0.0005, 0.0001])"
# Learning rate scheduling (cyclic learning rate is used here)
max_lr: !ref <lr> # Upper bound of the cycle (max value of the lr)
Expand Down Expand Up @@ -120,6 +120,13 @@ augment: !new:speechbrain.augment.augmenter.Augmenter
!ref <time_shift>,
!ref <add_noise_white>]

# WEIGHTS AND BIASES Configuration
project: "Zhou2016"
prefix_name: 'ShallowNet'
mode: "disabled"
entity: "neuro-gflow"
sweep_run: False # to indicate if you are running sweeps or normal wandb runs

# DATA NORMALIZATION
dims_to_normalize: 1 # 1 (time) or 2 (EEG channels)
normalize: !name:speechbrain.processing.signal_processing.mean_std_norm
Expand Down
29 changes: 29 additions & 0 deletions benchmarks/MOABB/run_hparam_opt_EEGNet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
#SBATCH --job-name=finetune
#SBATCH --output=finetune_output_%j.txt
#SBATCH --error=finetune_error_%j.txt
#SBATCH --ntasks=1
#SBATCH --time=5:00:00
#SBATCH --partition=unkillable
#SBATCH --cpus-per-task=6
#SBATCH --mem=32G
#SBATCH --gres=gpu:a100l:1

bash run_hparam_optimization.sh --exp_name 'EEGNet_BNCI2014001_hopt' \
--output_folder results/BNCI2014001/EEGNet/hopt \
--data_folder data \
--cached_data_folder data \
--hparams hparams/MotorImagery/BNCI2014001/EEGNet.yaml \
--nsbj_hpsearch 9 \
--nsess_hpsearch 2 \
--nsbj 9 \
--nsess 2 \
--nruns 1 \
--nruns_eval 10 \
--eval_metric acc \
--train_mode leave-one-subject-out \
--exp_max_trials 50 \
--store_all True \
--device 'cuda' \
--project 'EEGNet_BNCI2014001_hopt' \
--mode 'online'
29 changes: 29 additions & 0 deletions benchmarks/MOABB/run_hparam_opt_shallownet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
#SBATCH --job-name=finetune
#SBATCH --output=finetune_output_%j.txt
#SBATCH --error=finetune_error_%j.txt
#SBATCH --ntasks=1
#SBATCH --time=10:00:00
#SBATCH --partition=main
#SBATCH --cpus-per-task=8
#SBATCH --mem=48G
#SBATCH --gres=gpu:a100l:1

bash run_hparam_optimization.sh --exp_name 'ShallowConvNet_BNCI2014001_hopt' \
--output_folder results/BNCI2014001/ShallowConvNet/hopt \
--data_folder data \
--cached_data_folder data \
--hparams hparams/MotorImagery/BNCI2014001/ShallowConvNet.yaml \
--nsbj_hpsearch 9 \
--nsess_hpsearch 2 \
--nsbj 9 \
--nsess 2 \
--nruns 1 \
--nruns_eval 10 \
--eval_metric acc \
--train_mode leave-one-subject-out \
--exp_max_trials 50 \
--store_all True \
--device 'cuda' \
--project 'ShallowConvNet_BNCI2014001_hopt' \
--mode 'online'
Loading