-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathgenerate.sh
44 lines (39 loc) · 939 Bytes
/
generate.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
40
41
42
43
44
#!/bin/bash
if [ -z ${GPU} ]; then
GPU=0
fi
if [ -z ${MODE} ]; then
MODE=111
fi
if [ -z ${DATA_DIR} ]; then
DATA_DIR=/data/private/kxz/antibody/data/SAbDab
fi
if [ -z ${MODEL} ]; then
MODEL=mcatt
fi
if [ -z ${CDR} ]; then
CDR=3
fi
if [ -z ${RUN} ]; then
RUN=5
fi
echo "Using GPU: ${GPU}"
export CUDA_VISIBLE_DEVICES=$GPU
VERSION=0
if [ $1 ]; then
VERSION=$1
fi
CKPT_DIR=${DATA_DIR}/ckpt/${MODEL}_CDR${CDR}_${MODE}/version_${VERSION}
if [ $2 ]; then
CKPT=${CKPT_DIR}/checkpoint/`ls ${CKPT_DIR}/checkpoint -l | grep -o "epoch$2_step[0-9]*.ckpt"`
else
CKPT=${CKPT_DIR}/checkpoint/`ls ${CKPT_DIR}/checkpoint -l -t | head -n 2 | grep -o 'epoch[0-9]*_step[0-9]*.ckpt'`
fi
echo "Using checkpoint: ${CKPT}"
python generate.py \
--ckpt ${CKPT} \
--test_set ${DATA_DIR}/test.json \
--out ${CKPT_DIR}/results \
--gpu 0 \
--run ${RUN} \
--mode ${MODE} | tee -a ${CKPT_DIR}/eval_log.txt