{"id":3504,"library":"google-cloud-pipeline-components","title":"Google Cloud Pipeline Components","description":"This Python SDK provides a set of first-party (Google owned) pipeline components that enable users to build MLOps pipelines on Vertex AI using Kubeflow Pipelines (KFP) SDK. It integrates seamlessly with Vertex AI SDK and other Google Cloud services. The current version is 2.22.0, and releases are frequent, often aligned with KFP SDK updates.","status":"active","version":"2.22.0","language":"en","source_language":"en","source_url":"https://github.com/kubeflow/pipelines/tree/master/components/google-cloud","tags":["google-cloud","vertex-ai","kubeflow-pipelines","kfp","mlops","machine-learning"],"install":[{"cmd":"pip install google-cloud-pipeline-components","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"This library provides components for Kubeflow Pipelines (KFP) and requires `kfp` to define and compile pipelines.","package":"kfp","optional":false}],"imports":[{"note":"Commonly used for Vertex AI specific components like training jobs, batch predictions.","symbol":"aiplatform","correct":"from google_cloud_pipeline_components import aiplatform"},{"note":"Imports a specific component. Most components are under `v1` submodules like `custom_job`, `bigquery`, `dataflow`, etc.","symbol":"CustomJobOp","correct":"from google_cloud_pipeline_components.v1.custom_job import CustomJobOp"},{"note":"Example of importing a BigQuery component.","symbol":"BigQueryQueryJobOp","correct":"from google_cloud_pipeline_components.v1.bigquery import BigQueryQueryJobOp"}],"quickstart":{"code":"import kfp\nfrom kfp import dsl\nimport os\n\n# Import a Google Cloud Pipeline Component (GCPC)\nfrom google_cloud_pipeline_components.v1.custom_job import CustomJobOp\n\n@dsl.pipeline(name='gcp-quickstart-pipeline', description='A simple pipeline using GCPC')\ndef my_gcp_pipeline():\n    # Define a CustomJobOp from google-cloud-pipeline-components\n    # This component launches a custom container on Vertex AI\n    custom_task = CustomJobOp(\n        project=os.environ.get('GCP_PROJECT_ID', 'your-gcp-project-id'),\n        location=os.environ.get('GCP_REGION', 'us-central1'),\n        display_name='my-first-gcp-custom-job',\n        container_uri='gcr.io/cloud-aiplatform/training/tf-gpu.2-8:latest',\n        command=['sh', '-c', 'echo \"Hello from GCPC!\"'],\n        replica_count=1,\n        machine_type='n1-standard-4'\n    )\n\n# To run this pipeline, you would typically compile it:\n# kfp.compiler.Compiler().compile(my_gcp_pipeline, 'pipeline.json')\n# And then upload and run it on Vertex AI Pipelines.","lang":"python","description":"This quickstart defines a simple KFP pipeline using a `CustomJobOp` from `google-cloud-pipeline-components`. This component allows you to run arbitrary containerized code on Vertex AI. Remember to replace placeholder `GCP_PROJECT_ID` and `GCP_REGION` with your actual Google Cloud project and desired region, ideally using environment variables or a configuration."},"warnings":[{"fix":"Rewrite pipelines using KFP v2 DSL and directly instantiate `google-cloud-pipeline-components` classes. Consult KFP v2 and GCPC documentation for current syntax.","message":"This library is designed for Kubeflow Pipelines (KFP) v2 syntax. If migrating from KFP v1, component definition and pipeline construction syntax will be significantly different. KFP v1's `kfp.components.load_component_from_url` or direct YAML loading is generally incompatible with GCPC's object-oriented component instantiation.","severity":"breaking","affected_versions":"KFP v1 to KFP v2 migrations"},{"fix":"Ensure the service account running your Vertex AI Pipeline has all necessary IAM roles. Test permissions thoroughly in a development environment before deploying to production. Consult the Google Cloud documentation for required roles for each specific GCPC component.","message":"Proper Google Cloud IAM permissions are critical. The service account used to run the pipeline on Vertex AI (or your user credentials for local development) must have sufficient roles, such as 'Vertex AI User', 'Storage Admin' (for artifact storage), and specific permissions for any underlying GCP services your components interact with (e.g., BigQuery User, Dataflow Admin).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always explicitly specify the `location` parameter for regional GCPC components and verify it matches your target Google Cloud region.","message":"Most Vertex AI services are regional. Ensure that the `project` and `location` parameters passed to GCPC components (e.g., `CustomJobOp`, `BatchPredictionJobOp`) are consistent with the region where your resources exist or where you intend to run the job. Mismatched regions can lead to resource not found errors or increased latency.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}