-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiterative_bt_example.sh
44 lines (38 loc) · 1.25 KB
/
iterative_bt_example.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
#!/usr/bin/env bash
set -euo pipefail
LOG_LEVEL="debug"
SRC=$1
TGT=$2
NUM_ITER=${3:-"1"}
EXPERIMENT_LABEL=${4:-"iter_bt"}
DATA_VERSION=${5:-"v0"}
MARIAN_CONFIG_VERSION=${6:-"12x12"}
RAW_PARA_DATA_DIR="data/$SRC-$TGT/raw/$DATA_VERSION"
RAW_SRC_DATA_DIR="data/$SRC/raw"
RAW_TGT_DATA_DIR="data/$TGT/raw"
VALID_DIR="data/$SRC-$TGT/valid"
TEST_DIR="data/$SRC-$TGT/test"
MARIAN_CONFIG="config/marian.train.teacher.$MARIAN_CONFIG_VERSION.yml"
PIPELINE_DIR=experiments/$SRC-$TGT/$EXPERIMENT_LABEL.$MARIAN_CONFIG_VERSION.$DATA_VERSION
mkdir -p $PIPELINE_DIR
./go.py init \
--pipeline iterative_backtranslation \
--pipeline-dir $PIPELINE_DIR \
--pipeline-config config/pipeline.iterative_bt.yml \
--src-lang $SRC \
--tgt-lang $TGT \
--raw-data-parallel-dir $RAW_PARA_DATA_DIR \
--raw-data-src-dir $RAW_SRC_DATA_DIR \
--raw-data-tgt-dir $RAW_TGT_DATA_DIR \
--valid-data-dir $VALID_DIR \
--test-data-dir $TEST_DIR \
--marian-config $MARIAN_CONFIG \
--n-iterations $NUM_ITER \
--backtranslation-shard-size 100000 \
--log-level $LOG_LEVEL
exit 0
./go.py run \
--runner sbatch \
--runner-opts '--account=project_465000574 --partition=small-g --time=24:00:00' \
--pipeline-dir $PIPELINE_DIR \
--log-level $LOG_LEVEL