forked from abisee/pointer-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make it work on ml engine, google cloud storage
- Loading branch information
Showing
13 changed files
with
180 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
trainingInput: | ||
scaleTier: BASIC #BASIC_GPU | ||
pythonVersion: "3.5" | ||
runtimeVersion: "1.9" | ||
region: "us-east1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -x #echo on | ||
|
||
source ./venv/bin/activate | ||
|
||
gcloud ml-engine local train \ | ||
--module-name trainer.task \ | ||
--package-path trainer/ \ | ||
--job-dir /Users/me/googledrive/suma/log/huat \ | ||
-- \ | ||
--mode eval \ | ||
--data_path "/Users/me/googledrive/suma/finished_files/chunked/val_*" \ | ||
--vocab_path /Users/me/googledrive/suma/finished_files/vocab \ | ||
|
||
deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -x #echo on | ||
|
||
source ./venv/bin/activate | ||
|
||
gcloud ml-engine local train \ | ||
--module-name trainer.task \ | ||
--package-path trainer/ \ | ||
--job-dir /Users/me/googledrive/suma/log/huat \ | ||
-- \ | ||
--mode infer \ | ||
--data_path "/Users/me/googledrive/suma/finished_files/chunked/val_*" \ | ||
--vocab_path /Users/me/googledrive/suma/finished_files/vocab \ | ||
|
||
deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -x #echo on | ||
|
||
source ./venv/bin/activate | ||
|
||
gcloud ml-engine local train \ | ||
--module-name trainer.task \ | ||
--package-path trainer/ \ | ||
--job-dir /Users/me/googledrive/suma/log/huat \ | ||
-- \ | ||
--mode infer \ | ||
--data_path "/Users/me/googledrive/suma/finished_files/chunked/val_*" \ | ||
--vocab_path /Users/me/googledrive/suma/finished_files/vocab \ | ||
--single_pass 1 | ||
|
||
deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
set -x #echo on | ||
|
||
DATE=`date '+%Y%m%d_%H%M%S'` | ||
MAX_STEP=400 | ||
BUCKET_NAME="mybucket" | ||
MODEL_NAME="mymodel" | ||
JOB_NAME="${MODEL_NAME}_${DATE}" | ||
JOB_DIR="gs://${BUCKET_NAME}/models/${MODEL_NAME}" | ||
DATA_PATH="gs://${BUCKET_NAME}/data/finished_files/chunked/train_*" | ||
VOCAB_PATH="gs://${BUCKET_NAME}/data/finished_files/vocab" | ||
|
||
|
||
gcloud ml-engine jobs submit training ${JOB_NAME} \ | ||
--module-name trainer.task \ | ||
--package-path trainer/ \ | ||
--job-dir ${JOB_DIR} \ | ||
--config config.yaml \ | ||
-- \ | ||
--mode train \ | ||
--data_path ${DATA_PATH} \ | ||
--vocab_path ${VOCAB_PATH} \ | ||
--max_step ${MAX_STEP} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -x #echo on | ||
|
||
source ./venv/bin/activate | ||
|
||
gcloud ml-engine local train \ | ||
--module-name trainer.task \ | ||
--package-path trainer/ \ | ||
--job-dir /Users/me/googledrive/suma/log/huat \ | ||
-- \ | ||
--mode train \ | ||
--data_path "/Users/my/googledrive/suma/finished_files/chunked/train_*" \ | ||
--vocab_path /Users/my/googledrive/suma/finished_files/vocab \ | ||
--max_step 30 | ||
|
||
deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.