Registry / gcp / google-cloud-pipeline-components

google-cloud-pipeline-components

JSON →
library2.22.0pypypi✓ verified 23d ago

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.

pip install google-cloud-pipeline-components
INSTALL
IMPORT
SIG · GOOGLE-CLOUD-PIPEL
G
google-cloud-pipeline-components
gcppythonv2.22.0
Install
20.4s avg
Import
Disk
327MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.22.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 315.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 20.4s · import 0.000s · 313MB
327MB installed
● package 327MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sys
from google_cloud_pipeline_components import sys
from google_cloud_pipeline_components import aiplatform
version
from google_cloud_pipeline_components import version
from google_cloud_pipeline_components import aiplatform
warnings
from google_cloud_pipeline_components import warnings
from google_cloud_pipeline_components import aiplatform

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.

import kfp from kfp import dsl import os # Import a Google Cloud Pipeline Component (GCPC) from google_cloud_pipeline_components.v1.custom_job import CustomJobOp @dsl.pipeline(name='gcp-quickstart-pipeline', description='A simple pipeline using GCPC') def my_gcp_pipeline(): # Define a CustomJobOp from google-cloud-pipeline-components # This component launches a custom container on Vertex AI custom_task = CustomJobOp( project=os.environ.get('GCP_PROJECT_ID', 'your-gcp-project-id'), location=os.environ.get('GCP_REGION', 'us-central1'), display_name='my-first-gcp-custom-job', container_uri='gcr.io/cloud-aiplatform/training/tf-gpu.2-8:latest', command=['sh', '-c', 'echo "Hello from GCPC!"'], replica_count=1, machine_type='n1-standard-4' ) # To run this pipeline, you would typically compile it: # kfp.compiler.Compiler().compile(my_gcp_pipeline, 'pipeline.json') # And then upload and run it on Vertex AI Pipelines.
Debug
Known issues
breakingThis 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.
fix
Rewrite pipelines using KFP v2 DSL and directly instantiate `google-cloud-pipeline-components` classes. Consult KFP v2 and GCPC documentation for current syntax.
affects: KFP v1 to KFP v2 migrations
gotchaProper 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).
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.
affects: All versions
gotchaMost 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.
fix
Always explicitly specify the `location` parameter for regional GCPC components and verify it matches your target Google Cloud region.
affects: All versions
Upgrade
Version history
2.22.0latest on PyPI · released Nov 10, 2025
Audit
Dependencies
kfprequiredThis library provides components for Kubeflow Pipelines (KFP) and requires `kfp` to define and compile pipelines.
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
google-cloud-pipeline-components — pip install google-cloud-pipeline-components · libregistry