Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, explicamos a integração do PyTorch da Vertex AI e ofereceremos recursos
que mostram como usar o PyTorch na Vertex AI. A integração do PyTorch da Vertex AI
facilita o treinamento, a implantação e a orquestração de modelos do PyTorch
na produção.
Executar código em notebooks
A Vertex AI oferece duas opções para executar o código em
notebooks: Colab Enterprise e Vertex AI Workbench.
Para saber mais sobre essas opções, consulte
Escolher uma solução de notebook.
Contêineres pré-criados para treinamento
A Vertex AI oferece imagens de contêiner do Docker pré-criadas para treinamento de modelo.
Esses contêineres são organizados por frameworks de aprendizado de máquina, versões
de framework e incluem dependências comuns que podem ser usadas no
código de treinamento. Para saber quais versões do PyTorch têm contêineres de treinamento
pré-criados e como treinar modelos com um contêiner de treinamento pré-criado, consulte Contêineres pré-criados para treinamento personalizado.
Contêineres pré-criados para exibir previsões
A Vertex AI fornece imagens de contêiner do Docker pré-criadas para exibir
previsões em lote e on-line.
Esses contêineres são organizados por frameworks de aprendizado de máquina, versões
de framework e incluem dependências comuns que podem ser usadas no
código de previsão. Para saber quais versões do PyTorch têm contêineres de previsão
pré-criados e como exibir modelos com um contêiner de previsão pré-criado, consulte
Contêineres pré-criados para treinamento personalizado.
Treinamento distribuído
É possível executar o treinamento distribuído de modelos PyTorch na Vertex AI. Para
o treinamento de vários workers, é possível usar o Servidor de redução para otimizar ainda mais o desempenho
para operações coletivas com redução de tudo. Para saber mais sobre
o treinamento distribuído na Vertex AI, consulte
Treinamento distribuído.
Recursos para usar o PyTorch na Vertex AI
Para saber mais e começar a usar o PyTorch na Vertex AI, consulte os recursos
a seguir:
Tutorial: use a Vertex AI para treinar um modelo de classificação
de imagens PyTorch em um dos ambientes de contêiner pré-criados da Vertex
AI usando o console do Google Cloud.
Para seguir as instruções passo a passo desta tarefa diretamente no
console do Google Cloud, clique em Orientação:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-28 UTC."],[],[],null,["# PyTorch integration\n\n| To see an example of PyTorch integration,\n| run the \"Training, tuning and deploying a PyTorch text sentiment classification model\" 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/training/pytorch-text-sentiment-classification-custom-train-deploy.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%2Ftraining%2Fpytorch-text-sentiment-classification-custom-train-deploy.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%2Ftraining%2Fpytorch-text-sentiment-classification-custom-train-deploy.ipynb)\n|\n|\n| \\|\n|\n[View on GitHub](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/training/pytorch-text-sentiment-classification-custom-train-deploy.ipynb) \n\nThis page explains Vertex AI's PyTorch integration and provides resources\nthat show you how to use PyTorch on Vertex AI. Vertex AI's PyTorch\nintegration makes it easier for you to train, deploy, and orchestrate PyTorch\nmodels in production.\n\nRun code in notebooks\n---------------------\n\nVertex AI provides two options for running your code in\nnotebooks, Colab Enterprise and Vertex AI Workbench.\nTo learn more about these options, see\n[choose a notebook solution](/vertex-ai/docs/workbench/notebook-solution).\n\nPrebuilt containers for training\n--------------------------------\n\nVertex AI provides prebuilt Docker container images for model training.\nThese containers are organized by machine learning frameworks and framework\nversions and include common dependencies that you might want to use in your\ntraining code. To learn about which PyTorch versions have prebuilt training\ncontainers and how to train models with a prebuilt training container, see\n[Prebuilt containers for custom training](/vertex-ai/docs/training/pre-built-containers#pytorch).\n\nPrebuilt containers for serving inferences\n------------------------------------------\n\nVertex AI provides prebuilt Docker container images for serving both\nbatch and online inferences.\nThese containers are organized by machine learning frameworks and framework\nversions and include common dependencies that you might want to use in your\ninference code. To learn about which PyTorch versions have prebuilt inference\ncontainers and how to serve models with a prebuilt inference container, see\n[Prebuilt containers for custom training](/vertex-ai/docs/predictions/pre-built-containers).\n\nDistributed training\n--------------------\n\nYou can run distributed training of PyTorch models on Vertex AI. For\nmulti-worker training, you can use Reduction Server to optimize performance\neven further for all-reduce collective operations. To learn more about\ndistributed training on Vertex AI, see\n[Distributed training](/vertex-ai/docs/training/distributed-training).\n\nResources for using PyTorch on Vertex AI\n----------------------------------------\n\nTo learn more and start using PyTorch in Vertex AI, see the following\nresources:\n\n- [How to train and tune PyTorch models on Vertex AI](https://cloud.google.com/blog/topics/developers-practitioners/pytorch-google-cloud-how-train-and-tune-pytorch-models-vertex-ai): Learn how to use [Vertex AI Training](/vertex-ai/docs/training/overview) to build and train a sentiment text classification model using PyTorch and [Vertex AI Hyperparameter Tuning](/vertex-ai/docs/training/using-hyperparameter-tuning) to tune hyperparameters of PyTorch models.\n- [How to deploy PyTorch models on Vertex AI](https://cloud.google.com/blog/topics/developers-practitioners/pytorch-google-cloud-how-deploy-pytorch-models-vertex-ai): Walk through the deployment of a Pytorch model using [TorchServe](https://pytorch.org/serve/) as a custom container, by deploying the model artifacts to a [Vertex AI Inference](/vertex-ai/docs/predictions/overview) service.\n- [Orchestrating PyTorch ML Workflows on Vertex AI Pipelines](https://cloud.google.com/blog/topics/developers-practitioners/orchestrating-pytorch-ml-workflows-vertex-ai-pipelines): See how to build and orchestrate ML pipelines for training and deploying PyTorch models on Google Cloud Vertex AI using [Vertex AI Pipelines](/vertex-ai/docs/pipelines/introduction).\n- [Scalable ML Workflows using PyTorch on Kubeflow Pipelines and Vertex Pipelines](https://cloud.google.com/blog/topics/developers-practitioners/scalable-ml-workflows-using-pytorch-kubeflow-pipelines-and-vertex-pipelines): Take a look at examples of [PyTorch](https://pytorch.org/)-based ML workflows on OSS [Kubeflow Pipelines](https://www.kubeflow.org/docs/components/pipelines/), (part of the Kubeflow project) and [Vertex AI Pipelines](/vertex-ai/docs/pipelines). We share [new PyTorch built-in components](https://github.com/kubeflow/pipelines/tree/master/components/PyTorch/pytorch-kfp-components) added to the Kubeflow Pipelines.\n- [Serving PyTorch image models with prebuilt containers on\n Vertex AI](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/prediction/pytorch_image_classification_with_prebuilt_serving_containers.ipynb): This notebook deploys a PyTorch image classification model on Vertex AI using prebuilt PyTorch serving images.\n\nWhat's next\n-----------\n\n- Tutorial: Use Vertex AI to train a PyTorch image classification model in one of Vertex AI's prebuilt container environments by using the Google Cloud console.\n\n *** ** * ** ***\n\n To follow step-by-step guidance for this task directly in the\n Google Cloud console, click **Guide me**:\n\n [Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?walkthrough_id=vertex-pytorch-custom-training)\n\n *** ** * ** ***"]]