Skip to content

Commit

Permalink
ADD: updates for training
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjaykeller committed Jun 30, 2024
1 parent adbbcc5 commit b31e6f7
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@
"request": "launch",
"program": "${workspaceFolder}/src/train_gpt.py",
"args": [
"--training-steps=500",
"--training-steps=50000",
"--eval_every_n_steps=100",
"--log-every-n-steps=1",
"--per-device-training-batch-size=1",
"--per-device-validation-batch-size=1",
"--num-workers=0",
"--log-every-n-steps=10",
"--per-device-training-batch-size=32",
"--per-device-validation-batch-size=32",
"--num-workers=32",
"--num_chunks=32",
"--chunk_len=500",
"--chunk_ovlp=50",
Expand Down
8 changes: 8 additions & 0 deletions scripts/preprocess.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
python src/eeg/preprocess.py \
--input_directory data/tuh_eeg \
--output_directory data/npy_tuh_eeg \
--notch_filter 50 60 \
--bandpass_filter 1 48 \
--tuh_eeg \
--verbose \
--parallel
18 changes: 17 additions & 1 deletion scripts/train.sh
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
python3 src/train_gpt.py --training-steps=50000 --eval_every_n_steps=1000 --log-every-n-steps=3000 --per-device-training-batch-size=32 --per-device-validation-batch-size=32 --num-workers=16 --num_chunks=32 --chunk_len=256 --chunk_ovlp=32 --num-hidden-layers=6 --num-encoder-layers=6 --run-name='32clen2_embed1024' --training-style='CSM_causal' --embedding-dim=1024 --train-data-path='data/npy_tuh_eeg'
python src/train_gpt.py \
--training-steps=50000 \
--eval_every_n_steps=100 \
--log-every-n-steps=10 \
--per-device-training-batch-size=32 \
--per-device-validation-batch-size=32 \
--num-workers=32 \
--num_chunks=32 \
--chunk_len=500 \
--chunk_ovlp=50 \
--num-hidden-layers=6 \
--num-encoder-layers=6 \
--run-name=32clen2_embed1024 \
--training-style=CSM_causal \
--embedding-dim=1024 \
--train-data-path=data/npy_tuh_eeg \
--verbose=True
18 changes: 18 additions & 0 deletions scripts/train_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
python -m torch.distributed.launch --nproc_per_node=2 \
src/train_gpt.py \
--training-steps=50000 \
--eval_every_n_steps=100 \
--log-every-n-steps=1 \
--per-device-training-batch-size=32 \
--per-device-validation-batch-size=32 \
--num-workers=16 \
--num_chunks=32 \
--chunk_len=500 \
--chunk_ovlp=50 \
--num-hidden-layers=6 \
--num-encoder-layers=6 \
--run-name=32clen2_embed1024_multi_gpu \
--training-style=CSM_causal \
--embedding-dim=1024 \
--train-data-path=data/npy_tuh_eeg \
--verbose=True

0 comments on commit b31e6f7

Please sign in to comment.