Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Vertex AI Pipelines cannot compile kfp components

We started observe build failures for components built with KFP's `@component` notation.

> @component(
> packages_to_install=["requests"],
> base_image="python:3.11",
> output_component_file="component.yaml",
> )
> def component_func

The following error logs were thrown:

ERROR: Failed building wheel for kfp

ERROR: Could not build wheels for kfp, kfp-server-api, which is required to install pyproject.toml-based projects

kfp and kfp-server-api were installed by underlying processes on the VertexAI, but build processes are failing. How can we resolve this issue?

package versions:

kfp==2.0.0
google-cloud-aiplatform==1.39.0
google-cloud-pipeline-components==2.8.0
Solved Solved
0 2 115
1 ACCEPTED SOLUTION

Hi @ssivri,

Welcome to the Google Cloud Community!

It seems that your KFP components are failing to compile within Vertex AI Pipelines due to errors associated with building 'kfp' and 'kfp-server-api' during the component compilation process.

Here are the potential ways that might help with your use case:

  • Use a pre-built container image: You may want to utilize a pre-built, version-controlled container image from a registry, as it ensures a dependable, reproducible, and efficient foundation for your Vertex AI Pipelines, while minimizing runtime challenges.
  • Check pip Version: Ensure your base image includes an updated version of pip, as older versions may struggle to process pyproject.toml-based builds effectively.
  • Permissions: If you're utilizing a custom container registry for your base image, ensure that your service account has the appropriate permissions to access and retrieve the image.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

View solution in original post

2 REPLIES 2

Hi @ssivri,

Welcome to the Google Cloud Community!

It seems that your KFP components are failing to compile within Vertex AI Pipelines due to errors associated with building 'kfp' and 'kfp-server-api' during the component compilation process.

Here are the potential ways that might help with your use case:

  • Use a pre-built container image: You may want to utilize a pre-built, version-controlled container image from a registry, as it ensures a dependable, reproducible, and efficient foundation for your Vertex AI Pipelines, while minimizing runtime challenges.
  • Check pip Version: Ensure your base image includes an updated version of pip, as older versions may struggle to process pyproject.toml-based builds effectively.
  • Permissions: If you're utilizing a custom container registry for your base image, ensure that your service account has the appropriate permissions to access and retrieve the image.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

Thanks Marvin,

The build issue was resolved yesterday without any change. Moving forward, we will be transitioning to using pre-built images.