forked from paracrawl/cirrus-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path07.fix.sh
executable file
·35 lines (31 loc) · 961 Bytes
/
07.fix.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
#!/bin/bash
## create and submit the batches on csd3 for alignment
set -euo pipefail
shopt -s extglob
. ./env/init.sh
. ./config.sh
. ./functions.sh
collection=$1
shift
for lang in $*; do
# Load some language-spefic bicleaner & bifixer configurations (because they normally don't
# deal with zh or ko correctly. Read: time for the duct tape!
bicleaner_ai_model $lang
batch_list=`make_batch_list 07 $collection $lang hardruled.gz "aligned-+([0-9]*).gz"`
job_list=`make_job_list $batch_list`
if [ ! -z $job_list ]; then
prompt "Scheduling $job_list\n"
if confirm; then
schedule \
-J fix-${lang%~*}-${collection} \
-a $job_list \
--time 24:00:00 \
--cpus-per-task 4 `#because more memory` \
-e ${SLURM_LOGS}/07.fix-%A_%a.err \
-o ${SLURM_LOGS}/07.fix-%A_%a.out \
${SCRIPTS}/generic.slurm $batch_list \
${SCRIPTS}/07.fix ${collection} ${lang%~*} \
${COLLECTIONS[$collection]}-shards/${TARGET_LANG}
fi
fi
done