[[["์ดํดํ๊ธฐ ์ฌ์","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-03(UTC)"],[],[],null,["# Introduction to the Vertex AI SDK for Python\n\nThe Vertex AI SDK for Python helps you automate data ingestion, train models, and\nget predictions on Vertex AI. The Vertex AI SDK uses Python code to\naccess the Vertex AI API so that you can programmatically accomplish most of what\nyou can do in the Google Cloud console.\n\nTo learn how to install or update the Vertex AI SDK for Python, see [Install the\nVertex AI SDK for Python](/vertex-ai/docs/start/install-sdk). For more information, see\nthe [Vertex AI SDK for Python API reference documentation](/python/docs/reference/aiplatform/latest).\n\nWhy use the Vertex AI SDK\n-------------------------\n\nThe Vertex AI SDK for Python is recommended if you're an experienced machine\nlearning (ML) and artificial intelligence (AI) engineer or a data scientist who\nwants to programmatically automate your workflow. The Vertex AI SDK for Python is\nsimilar to the Vertex AI Python client library, except the\nVertex AI SDK is higher-level and less granular. For more information, see\n[Understand the SDK and client library differences](#sdk-vs-client-library).\n\n\u003cbr /\u003e\n\nWrite code with the Vertex AI SDK for Python\n--------------------------------------------\n\nTo use the Vertex AI SDK for Python:\n\n1. Install the `google-cloud-aiplatform` package, which includes both the Vertex AI SDK for Python and the Vertex AI Python client library, by running the following command in your virtual environment:\n\n pip install --upgrade google-cloud-aiplatform\n\n2. Use the following code to import the `google.cloud.aiplatform` namespace:\n\n from google.cloud import aiplatform\n\n | **Preview:** To use features for the Vertex AI SDK for Python that are still in [preview](/products#product-launch-stages), import `vertexai.preview`: \n |\n | ```python\n | import vertexai.preview\n | ```\n\n \u003cbr /\u003e\n\n3.\n\n If you're using a local shell, then create local authentication credentials for your user\n account:\n\n ```bash\n gcloud auth application-default login\n ```\n\n You don't need to do this if you're using Cloud Shell.\n\n\n If an authentication error is returned, and you are using an external identity provider\n (IdP), confirm that you have\n [signed in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n### Learn about the Vertex AI SDK for Python\n\nSee the following documentation:\n\n- [Vertex AI SDK class overview](/vertex-ai/docs/python-sdk/python-sdk-class-overview): introduces the key classes and functionality in the Vertex AI SDK.\n\n- [Python reference for Vertex AI](/python/docs/reference/aiplatform/latest): contains reference documentation for all of the namespaces, classes, methods, and properties in the `google-cloud-aiplatform` package, which includes the Vertex AI SDK, the Vertex AI SDK preview, and the Vertex AI Client libraries.\n\n### Try code samples and tutorials\n\nNotebook tutorials show how to use the Vertex AI SDK for Python as part of a\nlarger workflow. For more information, see\n[Vertex AI notebook tutorials](/vertex-ai/docs/tutorials/jupyter-notebooks).\n\nCode samples in the Vertex AI SDK for Python GitHub repository show you how to\ncomplete individual tasks. For more information, see the\n[Vertex AI SDK for Python GitHub repository](https://github.com/googleapis/python-aiplatform/). \n| To see an example of using the Vertex AI SDK as part of a more comprehensive workflow,\n| run the \"Custom training and online prediction\" notebook in one of the following\n| environments:\n|\n| [Open in Colab](https://colab.research.google.com/github/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/custom/sdk-custom-image-classification-online.ipynb)\n|\n|\n| \\|\n|\n| [Open in Colab Enterprise](https://console.cloud.google.com/vertex-ai/colab/import/https%3A%2F%2Fraw.githubusercontent.com%2FGoogleCloudPlatform%2Fvertex-ai-samples%2Fmain%2Fnotebooks%2Fofficial%2Fcustom%2Fsdk-custom-image-classification-online.ipynb)\n|\n|\n| \\|\n|\n| [Open\n| in Vertex AI Workbench](https://console.cloud.google.com/vertex-ai/workbench/deploy-notebook?download_url=https%3A%2F%2Fraw.githubusercontent.com%2FGoogleCloudPlatform%2Fvertex-ai-samples%2Fmain%2Fnotebooks%2Fofficial%2Fcustom%2Fsdk-custom-image-classification-online.ipynb)\n|\n|\n| \\|\n|\n| [View on GitHub](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/custom/sdk-custom-image-classification-online.ipynb)\n\nUnderstand the Vertex AI SDK and client library differences\n-----------------------------------------------------------\n\nWhen you install the Vertex AI SDK for Python, the Vertex AI Python client\nlibrary is also installed. The Vertex AI SDK and the\nVertex AI Python client library provide similar functionality with\ndifferent levels of granularity. The Vertex AI SDK operates at a\nhigher level of abstraction than the client library and is suitable for most\ncommon data science workflows. If you need lower-level functionality, then use\nthe Vertex AI Python client library.\n\nThe Vertex AI SDK is available for Python and a Vertex AI client\nlibrary is available for Python, Java, and Node.js. To learn how to install the\nJava or Node.js client library, see\n[Install the Vertex AI client libraries](/vertex-ai/docs/start/client-libraries).\nIf a client library isn't available in your preferred programming language, you\ncan use the Vertex AI REST API. For more information, see the\n[Vertex AI REST reference](/vertex-ai/docs/reference/rest).\n\n### Use Vertex AI Python client library and SDK together\n\nIf you use the Vertex AI SDK for Python and discover you need greater flexibility\nor control, or if you need a method not included in the Vertex AI SDK, you\ncan use the Vertex AI Python client library in the same workflow. The\nVertex AI Python client library uses a different namespace to access the\nVertex AI API. The client library and the Vertex AI SDK for Python\nnamespaces can be used in the same Python script by adding an `import` line for\neach in your Python script.\n\n### Import the Vertex AI Python client library namespace\n\nThe Vertex AI Python client library namespace is\n`google.cloud.aiplatform.gapic`. This namespace maps to the\n`google.cloud.aiplatform_v1` namespace. These two namespaces can be used\ninterchangeably. To import the Python client library, include one of the\nfollowing in your Python script: \n\n```\nfrom google.cloud import aiplatform_v1\n``` \n\n```\nfrom google.cloud.aiplatform import gapic\n```\n\nWhat's next\n-----------\n\n- Learn how to [choose a training method](/vertex-ai/docs/start/training-methods)."]]