-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtrain.sh
39 lines (34 loc) · 1.22 KB
/
train.sh
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
38
39
#!/bin/bash
#
#SBATCH --job-name=exp02-rnn
#SBATCH --partition=1080ti-short
#SBATCH --gres=gpu:8
#SBATCH --ntasks-per-node=24
#SBATCH --mem=64GB
#SBATCH -d singleton
#SBATCH --open-mode append
#SBATCH -o /mnt/nfs/work1/miyyer/wyou/RNN-NMT-Syntax/experiments/exp02/translate_gru.txt
#SBATCH --mail-type=ALL
#SBATCH [email protected]
BASE_PATH=/mnt/nfs/work1/miyyer
PROJECT_PATH=$BASE_PATH/wyou/RNN-NMT-Syntax
EXPERIMENT_PATH=$PROJECT_PATH/experiments/exp02
# Load in python3 and source the venv
module load python3/3.6.6-1810
source $PROJECT_PATH/../py36/bin/activate
# Need to include the venv path upfront...
# otherwise it defaults to the loaded slurm module which breaks for pynvml with python3
PYTHONPATH=$BASE_PATH/wyou/py36/lib/python3.6/site-packages/:$PYTHONPATH
python train.py --save $EXPERIMENT_PATH/checkpoint.pth.tar
#BASE_PARAMS=( \
# -d "$BASE_PATH/datasets/wmt/" \
# -p "$PROJECT_PATH/data/wmt" \
# --dataset wmt_en_de_parsed \
# --model parse_transformer \
# --span 6 \
# )
#
#env $(cat ~/.comet.ml | xargs) python main.py \
# "${BASE_PARAMS[@]}" --batch-size 500 \
# --restore $EXPERIMENT_PATH/checkpoint.pt --average-checkpoints 5 --split test \
# translate --order-output --output-directory $EXPERIMENT_PATH