diff --git a/housing_prices/cloud-ml-housing-prices.ipynb b/housing_prices/cloud-ml-housing-prices.ipynb index 73ac1c3..ee8a039 100644 --- a/housing_prices/cloud-ml-housing-prices.ipynb +++ b/housing_prices/cloud-ml-housing-prices.ipynb @@ -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", @@ -617,11 +617,11 @@ "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" ] } ], @@ -629,7 +629,7 @@ "%%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", @@ -669,11 +669,11 @@ "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" ] } ], @@ -681,7 +681,7 @@ "%%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", @@ -730,11 +730,11 @@ "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" ] } ], @@ -742,7 +742,7 @@ "%%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", @@ -813,11 +813,11 @@ "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" ] } ], @@ -825,7 +825,7 @@ "%%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", @@ -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" ] }, { @@ -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" ] }, { @@ -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" ]