forked from abisee/pointer-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train.sh
28 lines (25 loc) · 822 Bytes
/
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
#!/usr/bin/env bash
set -x #echo on
DATE=`date '+%Y%m%d_%H%M%S'`
MAX_STEP=30
BUCKET_NAME="mybucket"
EN_CORE_WEB_SM_PKG="gs://${BUCKET_NAME}/lib/en_core_web_sm-2.0.0.tar.gz"
STRINGX_PKG="gs://${BUCKET_NAME}/lib/sgcharts-stringx-1.1.1.tar.gz"
PACKAGES="${EN_CORE_WEB_SM_PKG},${STRINGX_PKG}"
MODEL_NAME="huat"
MODE="train"
JOB_NAME="${MODEL_NAME}_${MODE}_${DATE}"
JOB_DIR="gs://${BUCKET_NAME}/models/${MODEL_NAME}"
DATA_DIR="gs://${BUCKET_NAME}/data/train"
VOCAB_PATH="gs://${BUCKET_NAME}/data/vocab.tsv"
gcloud ml-engine jobs submit training ${JOB_NAME} \
--module-name trainer.task \
--package-path trainer/ \
--packages ${PACKAGES} \
--job-dir ${JOB_DIR} \
--config config.yaml \
-- \
--mode ${MODE} \
--data_dir ${DATA_DIR} \
--vocab_path ${VOCAB_PATH} \
--max_step ${MAX_STEP}