create_custom_training_job_from_component function
The create_custom_training_job_from_component utility
converts a given container or Python component to a component that runs a
custom job in Vertex AI. This simplifies the creation of custom training
jobs. All inputs and outputs of the supplied component will be copied over to
the constructed training job operator.
Note that this utility constructs a ClusterSpec, where the primary and all the
workers use the same specification, meaning all disk and machine
specification-related parameters will apply to all replicas. This is suitable
for use cases where, for example, you are training with
MultiWorkerMirroredStrategy or
MirroredStrategy.
This component does not support CustomJob Python package training, or
distributed training with different worker pool specs.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# CustomJob components\n\n[Custom training jobs](/vertex-ai/docs/training/create-custom-job) let you run your custom machine\nlearning (ML) training code in Vertex AI.\n\n`CustomTrainingJobOp`\n---------------------\n\nThe [`CustomTrainingJobOp`](https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-2.19.0/api/v1/custom_job.html#v1.custom_job.CustomTrainingJobOp) component exposes the full functionalities of the [`CustomJob` resource](/vertex-ai/docs/reference/rest/v1/projects.locations.customJobs), to allow both single and distributed training using a [`ContainerSpec`](/vertex-ai/docs/reference/rest/v1/CustomJobSpec#ContainerSpec) or [`PythonPackageSpec`](/vertex-ai/docs/reference/rest/v1/CustomJobSpec#PythonPackageSpec) instance.\n\n`create_custom_training_job_from_component` function\n----------------------------------------------------\n\nThe [`create_custom_training_job_from_component`](https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-2.19.0/api/v1/custom_job.html#v1.custom_job.create_custom_training_job_from_component) utility\nconverts a given container or Python component to a component that runs a\ncustom job in Vertex AI. This simplifies the creation of custom training\njobs. All inputs and outputs of the supplied component will be copied over to\nthe constructed training job operator.\n\nNote that this utility constructs a `ClusterSpec`, where the primary and all the\nworkers use the same specification, meaning all disk and machine\nspecification-related parameters will apply to all replicas. This is suitable\nfor use cases where, for example, you are training with\n[`MultiWorkerMirroredStrategy`](https://www.tensorflow.org/api_docs/python/tf/distribute/experimental/MultiWorkerMirroredStrategy) or\n[`MirroredStrategy`](https://www.tensorflow.org/api_docs/python/tf/distribute/MirroredStrategy).\n\nThis component does not support `CustomJob` Python package training, or\ndistributed training with different worker pool specs.\n\nAPI reference\n-------------\n\n- For component reference, see the [Google Cloud SDK reference for CustomJob components](https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-2.19.0/api/v1/custom_job.html).\n- For Vertex AI API reference, see the [`CustomJob` resource](/vertex-ai/docs/reference/rest/v1/projects.locations.customJobs) page.\n\nVersion history and release notes\n---------------------------------\n\nTo learn more about the version history and changes to the Google Cloud Pipeline Components SDK, see the [Google Cloud Pipeline Components SDK Release Notes](https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-2.19.0/release.html).\n\nTechnical support contacts\n--------------------------\n\nIf you have any questions, reach out to\n[kubeflow-pipelines-components@google.com](mailto: kubeflow-pipelines-components@google.com)."]]