|
315 | 315 | "source": [
|
316 | 316 | "# Submit the training job\n",
|
317 | 317 | "\n",
|
318 |
| - "In this section, you use [`gcloud ml-engine jobs submit training`](https://cloud.google.com/sdk/gcloud/reference/ml-engine/jobs/submit/training) to submit your training job. The `--` argument passed to the command is a separator; anything after the separator will be passed to the Python code as input arguments.\n", |
| 318 | + "In this section, you use [`gcloud ai-platform jobs submit training`](https://cloud.google.com/sdk/gcloud/reference/ai-platform/jobs/submit/training) to submit your training job. The `--` argument passed to the command is a separator; anything after the separator will be passed to the Python code as input arguments.\n", |
319 | 319 | "\n",
|
320 | 320 | "For more information about the arguments preceeding the separator, run the following:\n",
|
321 | 321 | "\n",
|
322 |
| - " gcloud ml-engine jobs submit training --help\n", |
| 322 | + " gcloud ai-platform jobs submit training --help\n", |
323 | 323 | "\n",
|
324 | 324 | "The argument given to the python script is `--bucket-name`. The `--bucket-name` argument is used to specify the name of the bucket to save the model file."
|
325 | 325 | ]
|
|
347 | 347 | "outputs": [],
|
348 | 348 | "source": [
|
349 | 349 | "# Submit the training job:\n",
|
350 |
| - "!gcloud ml-engine jobs submit training $JOB_NAME \\\n", |
| 350 | + "!gcloud ai-platform jobs submit training $JOB_NAME \\\n", |
351 | 351 | " --job-dir gs://$BUCKET_NAME/census_job_dir \\\n",
|
352 | 352 | " --package-path ./census_training \\\n",
|
353 | 353 | " --module-name census_training.train \\\n",
|
|
419 | 419 | "metadata": {},
|
420 | 420 | "outputs": [],
|
421 | 421 | "source": [
|
422 |
| - "!gcloud ml-engine models create $MODEL_NAME --regions us-central1" |
| 422 | + "!gcloud ai-platform models create $MODEL_NAME --regions us-central1" |
423 | 423 | ]
|
424 | 424 | },
|
425 | 425 | {
|
|
435 | 435 | "metadata": {},
|
436 | 436 | "outputs": [],
|
437 | 437 | "source": [
|
438 |
| - "!gcloud ml-engine versions create $VERSION_NAME \\\n", |
| 438 | + "!gcloud ai-platform versions create $VERSION_NAME \\\n", |
439 | 439 | " --model=$MODEL_NAME \\\n",
|
440 | 440 | " --framework=scikit-learn \\\n",
|
441 | 441 | " --origin=gs://$BUCKET_NAME/ \\\n",
|
|
506 | 506 | },
|
507 | 507 | "outputs": [],
|
508 | 508 | "source": [
|
509 |
| - "!gcloud ml-engine predict --model $MODEL_NAME --version \\\n", |
| 509 | + "!gcloud ai-platform predict --model $MODEL_NAME --version \\\n", |
510 | 510 | " $VERSION_NAME --json-instances $INPUT_FILE"
|
511 | 511 | ]
|
512 | 512 | },
|
|
533 | 533 | "outputs": [],
|
534 | 534 | "source": [
|
535 | 535 | "# Delete the model version\n",
|
536 |
| - "!gcloud ml-engine versions delete $VERSION_NAME --model=$MODEL_NAME --quiet\n", |
| 536 | + "!gcloud ai-platform versions delete $VERSION_NAME --model=$MODEL_NAME --quiet\n", |
537 | 537 | "\n",
|
538 | 538 | "# Delete the model\n",
|
539 |
| - "!gcloud ml-engine models delete $MODEL_NAME --quiet\n", |
| 539 | + "!gcloud ai-platform models delete $MODEL_NAME --quiet\n", |
540 | 540 | "\n",
|
541 | 541 | "# Delete the bucket and contents\n",
|
542 | 542 | "!gsutil rm -r gs://$BUCKET_NAME\n",
|
|
0 commit comments