Created
October 26, 2019 18:37
-
-
Save Shereef/2cb069b4001c9de7083ed10b766e09e9 to your computer and use it in GitHub Desktop.
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
git clone https://github.com/GoogleCloudPlatform/cloudml-samples.git | |
cd cloudml-samples/census/estimator | |
mkdir data | |
gsutil -m cp gs://cloud-samples-data/ml-engine/census/data/* data/ | |
PROJECT_ID=$(gcloud config list project --format "value(core.project)") | |
BUCKET_NAME=${PROJECT_ID}-mlengine | |
REGION=us-central1 | |
gsutil mb -l $REGION gs://$BUCKET_NAME | |
gsutil cp -r data gs://$BUCKET_NAME/data | |
TRAIN_DATA=gs://$BUCKET_NAME/data/adult.data.csv | |
EVAL_DATA=gs://$BUCKET_NAME/data/adult.test.csv | |
gsutil cp ../test.json gs://$BUCKET_NAME/data/test.json | |
TEST_JSON=gs://$BUCKET_NAME/data/test.json | |
JOB_NAME=census_single_1 | |
OUTPUT_PATH=gs://$BUCKET_NAME/$JOB_NAME | |
gcloud ai-platform jobs submit training $JOB_NAME --job-dir $OUTPUT_PATH --runtime-version 1.14 --python-version 3.5 --module-name trainer.task --package-path trainer/ --region $REGION -- --train-files $TRAIN_DATA --eval-files $EVAL_DATA --train-steps 1000 --eval-steps 100 --verbosity DEBUG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment