[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Train a model using Vertex AI and the Python SDK\n\n| This tutorial takes between 30 and 60 minutes to complete.\n\n\u003cbr /\u003e\n\nThis tutorial is a start-to-finish guide that shows you how to use the\nVertex AI SDK for Python to create a custom-trained model. You run code in a\nnotebook (IPYNB) file that uses a Docker container to train and create the\nmodel. The tutorial is for data scientists who are new to Vertex AI and\nfamiliar with notebooks, Python, and the Machine Learning (ML) workflow.\n\nThe process starts using the Google Cloud console to create the project that\ncontains your work. In your project, you use Vertex AI Workbench to\ncreate a Jupyter notebook. The notebook environment is where you run code\nthat downloads and prepares a dataset, then use the dataset to create and train\na model. At the end of the tutorial, the trained model generates predictions.\n\nThe goal of this tutorial is to walk you through every step required to create\npredictions in less than an hour. The dataset used is relatively small so that it\ndoesn't take very long to train your model. When you're done, you can apply what\nyou learn to larger datasets. The larger your dataset is, the more accurate your\npredictions are.\n\nTutorial steps\n--------------\n\n1. [Prerequisites](/vertex-ai/docs/tutorials/tabular-bq-prediction/prerequisites) - Create your Google Cloud\n account and project.\n\n2. [Create a\n notebook](/vertex-ai/docs/tutorials/tabular-bq-prediction/create-notebook) -\n Create and prepare a Jupyter notebook and its environment. You use the\n notebook to run code that creates your dataset, creates and trains your\n model, and generates your predictions.\n\n3. [Create a dataset](/vertex-ai/docs/tutorials/tabular-bq-prediction/create-dataset) - Download a publicly\n available BigQuery dataset, then use it to create a Vertex AI\n tabular dataset. The dataset contains the data you use to train your model.\n\n4. [Create a training script](/vertex-ai/docs/tutorials/tabular-bq-prediction/create-training-script) - Create\n a Python script that you pass to your training job. The script runs when the\n training job trains and creates your model.\n\n5. [Train a model](/vertex-ai/docs/tutorials/tabular-bq-prediction/train-and-deploy-model) - Use your tabular\n dataset to train and deploy a model. You use the model to create your\n predictions.\n\n6. [Make predictions](/vertex-ai/docs/tutorials/tabular-bq-prediction/make-prediction) - Use your model to\n create predictions. This section also walks you through deleting resources\n you create while running this tutorial so you don't incur unnecessary\n charges.\n\nWhat you accomplish\n-------------------\n\nThis tutorial walks you through how to use the Vertex AI SDK for Python to do the\nfollowing:\n\n- Create a Cloud Storage bucket to store a dataset\n- Preprocess data for training\n- Use the processed data to create a dataset in BigQuery\n- Use the BigQuery dataset to create a Vertex AI tabular dataset\n- Create and train a custom-trained model\n- Deploy the custom-trained model to an endpoint\n- Generate a prediction\n- Undeploy the model\n- Delete all resources created in the tutorial so you don't incur further charges\n\nBillable resources used\n-----------------------\n\nThis tutorial uses billable resources associated with the Vertex AI,\nBigQuery, and Cloud Storage Google Cloud services. If you're\nnew to Google Cloud, you might be able to use one or more of these services at\nno cost. Vertex AI offers $300 in free credits to new customers, and\nCloud Storage and BigQuery have [free\ntiers](https://cloud.google.com/free). For more information, see the following:\n\n- [Vertex AI pricing](/vertex-ai/pricing) and [Free cloud features and trial offer](https://cloud.google.com/free/docs/free-cloud-features#free-trial)\n- [BigQuery pricing](/bigquery/pricing) and [BigQuery free tier usage](https://cloud.google.com/free/docs/free-cloud-features?#bigquery)\n- [Cloud Storage pricing](/storage/pricing) and [Cloud Storage free tier usage](https://cloud.google.com/free/docs/free-cloud-features#storage)\n- [Google Cloud pricing calculator](/products/calculator)\n\nTo prevent further charges, the final step of this tutorial walks you\nthrough removing all billable Google Cloud resources you created."]]