Required. The URI of a container image in Artifact Registry that will run
the provided Python package. Vertex AI provides a wide range of executor
images with pre-installed packages to meet users' various use cases. See
the list of pre-built containers for
training.
You must use an image from this list.
Required. The Google Cloud Storage location of the Python package files
which are the training program and its dependent packages. The maximum
number of package URIs is 100.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003ePythonPackageSpec\u003c/code\u003e class within the Vertex AI v1beta1 API, specifically for the .NET environment.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePythonPackageSpec\u003c/code\u003e is a class that defines the specifications for a Python packaged code, inheriting from \u003ccode\u003eobject\u003c/code\u003e and implementing several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties such as \u003ccode\u003eArgs\u003c/code\u003e, \u003ccode\u003eEnv\u003c/code\u003e, \u003ccode\u003eExecutorImageUri\u003c/code\u003e, \u003ccode\u003ePackageUris\u003c/code\u003e, and \u003ccode\u003ePythonModule\u003c/code\u003e, which define the arguments, environment variables, container image URI, package locations, and the main Python module to be executed, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePythonPackageSpec\u003c/code\u003e allows users to customize their training programs by specifying a container image from a list of pre-built containers provided by Vertex AI, along with the location of their code and the desired entry module.\u003c/p\u003e\n"],["\u003cp\u003eThere are two versions available within this document, the latest version \u003ccode\u003e1.0.0-beta21\u003c/code\u003e and an older version \u003ccode\u003e1.0.0-beta20\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Vertex AI v1beta1 API - Class PythonPackageSpec (1.0.0-beta47)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta47 (latest)](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.PythonPackageSpec)\n- [1.0.0-beta46](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/1.0.0-beta46/Google.Cloud.AIPlatform.V1Beta1.PythonPackageSpec) \n\n public sealed class PythonPackageSpec : IMessage\u003cPythonPackageSpec\u003e, IEquatable\u003cPythonPackageSpec\u003e, IDeepCloneable\u003cPythonPackageSpec\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Vertex AI v1beta1 API class PythonPackageSpec.\n\nThe spec of a Python packaged code. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PythonPackageSpec \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PythonPackageSpec](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.PythonPackageSpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PythonPackageSpec](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.PythonPackageSpec), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PythonPackageSpec](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.PythonPackageSpec), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.AIPlatform.V1Beta1](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.AIPlatform.V1Beta1.dll\n\nConstructors\n------------\n\n### PythonPackageSpec()\n\n public PythonPackageSpec()\n\n### PythonPackageSpec(PythonPackageSpec)\n\n public PythonPackageSpec(PythonPackageSpec other)\n\nProperties\n----------\n\n### Args\n\n public RepeatedField\u003cstring\u003e Args { get; }\n\nCommand line arguments to be passed to the Python task.\n\n### Env\n\n public RepeatedField\u003cEnvVar\u003e Env { get; }\n\nEnvironment variables to be passed to the python module.\nMaximum limit is 100.\n\n### ExecutorImageUri\n\n public string ExecutorImageUri { get; set; }\n\nRequired. The URI of a container image in Artifact Registry that will run\nthe provided Python package. Vertex AI provides a wide range of executor\nimages with pre-installed packages to meet users' various use cases. See\nthe list of [pre-built containers for\ntraining](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).\nYou must use an image from this list.\n\n### PackageUris\n\n public RepeatedField\u003cstring\u003e PackageUris { get; }\n\nRequired. The Google Cloud Storage location of the Python package files\nwhich are the training program and its dependent packages. The maximum\nnumber of package URIs is 100.\n\n### PythonModule\n\n public string PythonModule { get; set; }\n\nRequired. The Python module name to run after installing the packages."]]