Skip to content
Snippets Groups Projects
Commit dbdb16b8 authored by Daniel Ecer's avatar Daniel Ecer
Browse files

optionally use specific temp bucket when running ml-engine jobs

parent cf86719e
No related branches found
No related tags found
No related merge requests found
......@@ -41,11 +41,12 @@ if [ $USE_SEPARATE_CHANNELS == true ]; then
fi
if [ $USE_CLOUD == true ]; then
JOB_ID="eval_$JOB_ID"
gcloud ml-engine jobs submit training "$JOB_ID" \
--stream-logs \
--module-name sciencebeam_gym.trainer.task \
--package-path sciencebeam_gym \
--staging-bucket "$BUCKET" \
--staging-bucket "$TEMP_BUCKET" \
--region us-central1 \
--runtime-version=1.2 \
-- \
......
......@@ -55,7 +55,7 @@ if [ $USE_CLOUD == true ]; then
--stream-logs \
--module-name sciencebeam_gym.trainer.task \
--package-path sciencebeam_gym \
--staging-bucket "$BUCKET" \
--staging-bucket "$TEMP_BUCKET" \
--region us-central1 \
--runtime-version=1.2 \
-- \
......
......@@ -11,6 +11,7 @@ TRAINING_ARGS=""
PROJECT=$(gcloud config list project --format "value(core.project)")
LOCAL_PATH_ROOT="./.models"
BUCKET="gs://${PROJECT}-ml"
TEMP_BUCKET=
COLOR_MAP_FILENAME="color_map.conf"
USE_SEPARATE_CHANNELS=true
DATASET_SUFFIX=
......@@ -61,6 +62,10 @@ if [ -z "$JOB_ID" ]; then
JOB_ID="${DEFAULT_JOB_ID}"
fi
if [ -z "$TEMP_BUCKET" ]; then
TEMP_BUCKET="${BUCKET}"
fi
# cloud paths
GCS_SUB_PROJECT_PATH="${BUCKET}/${SUB_PROJECT_NAME}"
GCS_PATH="${GCS_SUB_PROJECT_PATH}/${MODEL_NAME}/${VERSION_NAME}"
......
......@@ -41,7 +41,7 @@ if [ $USE_CLOUD == true ]; then
--stream-logs \
--module-name sciencebeam_gym.trainer.task \
--package-path sciencebeam_gym \
--staging-bucket "$BUCKET" \
--staging-bucket "$TEMP_BUCKET" \
--region us-central1 \
--runtime-version=1.2 \
-- \
......
......@@ -39,7 +39,7 @@ if [ $USE_CLOUD == true ]; then
--stream-logs \
--module-name sciencebeam_gym.trainer.task \
--package-path sciencebeam_gym \
--staging-bucket "$BUCKET" \
--staging-bucket "$TEMP_BUCKET" \
--region us-central1 \
--runtime-version=1.2 \
--scale-tier=BASIC_GPU \
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment