[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-11-25。"],[],[],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)."]]