-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5-train_nn_gpu.sh
More file actions
executable file
·37 lines (32 loc) · 1.11 KB
/
5-train_nn_gpu.sh
File metadata and controls
executable file
·37 lines (32 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#SBATCH --job-name=nn_gpu
#SBATCH --output=logs/train_nn_gpu.out
#SBATCH --partition=gpu06
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --time=06:00:00
## configs
module purge
module load python
source myenv/bin/activate
## copy needed files to /scratch
cd /scratch/$SLURM_JOB_ID
mkdir -p data src logs output
scp $SLURM_SUBMIT_DIR/output/x*.csv output/
scp $SLURM_SUBMIT_DIR/output/y*.csv output/
scp $SLURM_SUBMIT_DIR/src/*.py src/
#####################################################
## run tasks
#####################################################
loss=mse
model=G
bs=128
gamma=0.6
fl=0
device=cuda
python3 -u src/train_nn.py --model=$model --loss=$loss --bs=$bs --gamma=$gamma --fl=$fl --device=$device > logs/train_nn_${model}_${loss}_${bs}_${gamma}_fl_${fl}_device_${device}.log
#####################################################
## copy needed output files to /home
scp output/pred_nn_${model}_${loss}_${bs}_${gamma}_fl_${fl}_device_${device}.csv $SLURM_SUBMIT_DIR/output/
scp logs/train_nn_${model}_${loss}_${bs}_${gamma}_fl_${fl}_device_${device}.log $SLURM_SUBMIT_DIR/logs/