Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation updates for ml-engine command group #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions housing_prices/cloud-ml-housing-prices.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@
],
"source": [
"%%bash\n",
"gcloud ml-engine local train \\\n",
"gcloud ai-platform local train \\\n",
" --module-name=trainer.task \\\n",
" --package-path=trainer \\\n",
" -- \\\n",
Expand Down Expand Up @@ -617,19 +617,19 @@
"Job [housing_180305_185634] submitted successfully.\n",
"Your job is still active. You may view the status of your job with the command\n",
"\n",
" $ gcloud ml-engine jobs describe housing_180305_185634\n",
" $ gcloud ai-platform jobs describe housing_180305_185634\n",
"\n",
"or continue streaming the logs with the command\n",
"\n",
" $ gcloud ml-engine jobs stream-logs housing_180305_185634\n"
" $ gcloud ai-platform jobs stream-logs housing_180305_185634\n"
]
}
],
"source": [
"%%bash\n",
"JOBNAME=housing_$(date -u +%y%m%d_%H%M%S)\n",
"\n",
"gcloud ml-engine jobs submit training $JOBNAME \\\n",
"gcloud ai-platform jobs submit training $JOBNAME \\\n",
" --region=$REGION \\\n",
" --module-name=trainer.task \\\n",
" --package-path=./trainer \\\n",
Expand Down Expand Up @@ -669,19 +669,19 @@
"Job [housing_180305_185638] submitted successfully.\n",
"Your job is still active. You may view the status of your job with the command\n",
"\n",
" $ gcloud ml-engine jobs describe housing_180305_185638\n",
" $ gcloud ai-platform jobs describe housing_180305_185638\n",
"\n",
"or continue streaming the logs with the command\n",
"\n",
" $ gcloud ml-engine jobs stream-logs housing_180305_185638\n"
" $ gcloud ai-platform jobs stream-logs housing_180305_185638\n"
]
}
],
"source": [
"%%bash\n",
"JOBNAME=housing_$(date -u +%y%m%d_%H%M%S)\n",
"\n",
"gcloud ml-engine jobs submit training $JOBNAME \\\n",
"gcloud ai-platform jobs submit training $JOBNAME \\\n",
" --region=$REGION \\\n",
" --module-name=trainer.task \\\n",
" --package-path=./trainer \\\n",
Expand Down Expand Up @@ -730,19 +730,19 @@
"Job [housing_180305_183840] submitted successfully.\n",
"Your job is still active. You may view the status of your job with the command\n",
"\n",
" $ gcloud ml-engine jobs describe housing_180305_183840\n",
" $ gcloud ai-platform jobs describe housing_180305_183840\n",
"\n",
"or continue streaming the logs with the command\n",
"\n",
" $ gcloud ml-engine jobs stream-logs housing_180305_183840\n"
" $ gcloud ai-platform jobs stream-logs housing_180305_183840\n"
]
}
],
"source": [
"%%bash\n",
"JOBNAME=housing_$(date -u +%y%m%d_%H%M%S)\n",
"\n",
"gcloud ml-engine jobs submit training $JOBNAME \\\n",
"gcloud ai-platform jobs submit training $JOBNAME \\\n",
" --region=$REGION \\\n",
" --module-name=trainer.task \\\n",
" --package-path=./trainer \\\n",
Expand Down Expand Up @@ -813,19 +813,19 @@
"Job [housing_180305_183843] submitted successfully.\n",
"Your job is still active. You may view the status of your job with the command\n",
"\n",
" $ gcloud ml-engine jobs describe housing_180305_183843\n",
" $ gcloud ai-platform jobs describe housing_180305_183843\n",
"\n",
"or continue streaming the logs with the command\n",
"\n",
" $ gcloud ml-engine jobs stream-logs housing_180305_183843\n"
" $ gcloud ai-platform jobs stream-logs housing_180305_183843\n"
]
}
],
"source": [
"%%bash\n",
"JOBNAME=housing_$(date -u +%y%m%d_%H%M%S)\n",
"\n",
"gcloud ml-engine jobs submit training $JOBNAME \\\n",
"gcloud ai-platform jobs submit training $JOBNAME \\\n",
" --region=$REGION \\\n",
" --module-name=trainer.task \\\n",
" --package-path=./trainer \\\n",
Expand Down Expand Up @@ -961,10 +961,10 @@
"MODEL_VERSION=\"v1\"\n",
"MODEL_LOCATION=output/export/Servo/$(ls output/export/Servo | tail -1) \n",
"\n",
"#gcloud ml-engine versions delete ${MODEL_VERSION} --model ${MODEL_NAME} #Uncomment to overwrite existing version\n",
"#gcloud ml-engine models delete ${MODEL_NAME} #Uncomment to overwrite existing model\n",
"gcloud ml-engine models create ${MODEL_NAME} --regions $REGION\n",
"gcloud ml-engine versions create ${MODEL_VERSION} --model ${MODEL_NAME} --origin ${MODEL_LOCATION} --staging-bucket=$GCS_BUCKET"
"#gcloud ai-platform versions delete ${MODEL_VERSION} --model ${MODEL_NAME} #Uncomment to overwrite existing version\n",
"#gcloud ai-platform models delete ${MODEL_NAME} #Uncomment to overwrite existing model\n",
"gcloud ai-platform models create ${MODEL_NAME} --regions $REGION\n",
"gcloud ai-platform versions create ${MODEL_VERSION} --model ${MODEL_NAME} --origin ${MODEL_LOCATION} --staging-bucket=$GCS_BUCKET"
]
},
{
Expand Down Expand Up @@ -1034,7 +1034,7 @@
}
],
"source": [
"!gcloud ml-engine predict --model housing_prices --json-instances records.json"
"!gcloud ai-platform predict --model housing_prices --json-instances records.json"
]
},
{
Expand All @@ -1052,7 +1052,7 @@
"#### What we didn't cover\n",
"1. How to leverage larger than memory datasets using Tensorflow's queueing system\n",
"2. How to create synthetic features from our raw data to aid learning (Feature Engineering)\n",
"3. How to improve model performance by finding the ideal hyperparameters using Cloud ML Engine's [HyperTune](https://cloud.google.com/ml-engine/docs/how-tos/using-hyperparameter-tuning) feature\n",
"3. How to improve model performance by finding the ideal hyperparameters using Cloud ML Engine's [HyperTune](https://cloud.google.com/ml-engine/docs/tensorflow/using-hyperparameter-tuning) feature\n",
"\n",
"This lab is a great start, but adding in the above concepts is critical in getting your models to production ready quality. These concepts are covered in Google's 1-week on-demand Tensorflow + Cloud ML course: https://www.coursera.org/learn/serverless-machine-learning-gcp"
]
Expand Down