From 8839ef0e3af0927701051f96c4bfbaf711fcb713 Mon Sep 17 00:00:00 2001 From: AJ Keller Date: Mon, 1 Jul 2024 00:50:20 +0000 Subject: [PATCH] ADD: final configs for first release --- scripts/download.sh | 1 + scripts/preprocess.sh | 0 scripts/setup.sh | 7 ++++++- scripts/train_parallel.sh | 11 ++++++----- src/eeg/utils.py | 1 + 5 files changed, 14 insertions(+), 6 deletions(-) create mode 100755 scripts/download.sh mode change 100644 => 100755 scripts/preprocess.sh diff --git a/scripts/download.sh b/scripts/download.sh new file mode 100755 index 0000000..a6a58b2 --- /dev/null +++ b/scripts/download.sh @@ -0,0 +1 @@ +rsync -auxvL --no-owner --no-group nedc-tuh-eeg@www.isip.piconepress.com:data/tuh_eeg/tuh_eeg/v2.0.1/ . \ No newline at end of file diff --git a/scripts/preprocess.sh b/scripts/preprocess.sh old mode 100644 new mode 100755 diff --git a/scripts/setup.sh b/scripts/setup.sh index 907a4ca..e4ddb8a 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -3,6 +3,11 @@ # Print welcome message echo "Welcome to the setup script!" +# Make data directory +echo "Creating data directory..." +mkdir -p data +mkdir -p data/tuh_eeg + # Ask user for their name to set git config user.name echo "Asking for your name to set git configuration..." read -p "Please enter your name: " name @@ -23,7 +28,7 @@ apt-get update # Install tmux and htop for terminal multiplexing and process monitoring echo "Installing tmux and htop..." -apt-get install -y tmux htop +apt-get install -y tmux htop rsync # Generate a new SSH key using the provided email echo "Generating a new SSH key..." diff --git a/scripts/train_parallel.sh b/scripts/train_parallel.sh index e2f7442..e278b6b 100755 --- a/scripts/train_parallel.sh +++ b/scripts/train_parallel.sh @@ -1,11 +1,11 @@ -python -m torch.distributed.launch --nproc_per_node=2 \ +python -m torch.distributed.launch --nproc_per_node=8 \ src/train_gpt.py \ --training-steps=50000 \ - --eval_every_n_steps=100 \ - --log-every-n-steps=1 \ + --eval_every_n_steps=100000 \ + --log-every-n-steps=100 \ --per-device-training-batch-size=32 \ --per-device-validation-batch-size=32 \ - --num-workers=16 \ + --num-workers=32 \ --num_chunks=32 \ --chunk_len=500 \ --chunk_ovlp=50 \ @@ -15,4 +15,5 @@ python -m torch.distributed.launch --nproc_per_node=2 \ --training-style=CSM_causal \ --embedding-dim=1024 \ --train-data-path=data/npy_tuh_eeg \ - --verbose=True \ No newline at end of file + --verbose=True \ + &> train_parallel.log diff --git a/src/eeg/utils.py b/src/eeg/utils.py index 01b4fbc..250167f 100644 --- a/src/eeg/utils.py +++ b/src/eeg/utils.py @@ -10,6 +10,7 @@ # EEG_ALL_CHANNELS = sorted(list(set(EEG_10_20_CHANNELS + EEG_10_10_CHANNELS))) EEG_ALL_CHANNELS = sorted(list(set(EEG_10_20_CHANNELS))) +NUM_CHANNELS = len(EEG_ALL_CHANNELS) def align_data_to_standard_channels(input_data, channel_locations): """