Reputation: 11
I'm encountering a 400 (Bad Request) error when attempting to upload a Kubeflow pipeline to Google Artifact Registry.
kfp==2.10.1
kfp-pipeline-spec==0.5.0
Repository Format: Kubeflow Pipeline IAM: artifactregistry.writer role and artifactregistry.admin roleconfigured Region: europe-west1
(a repo need to be created first in artifact registry in kfp format)
from kfp import dsl, compiler
from kfp.registry import RegistryClient
ARTIFACT_REGISTRY_URL = "https://europe-west1-kfp.pkg.dev/my_project/ml-pipeline"
PIPELINE_OUTPUT_PATH = "pipeline.yml"
@dsl.pipeline(
name="example_pipeline",
description="Example pipeline to demonstrate upload to Artifact Registry"
)
def my_pipeline():
\# Pipeline definition here
pass
python
pipeline_func=my_pipeline,
package_path=PIPELINE_OUTPUT_PATH
)
client = RegistryClient(host=ARTIFACT_REGISTRY_URL)
client.upload_pipeline(file_name=PIPELINE_OUTPUT_PATH)
HTTPError: 400 Client Error: Bad Request for url: https://europe-west1-kfp.pkg.dev/my_project/ml-pipeline
✅ Verified pipeline.yml file generation
✅ Checked IAM permissions
✅ Validated repository URL
Automate the upload of pipeline updates to Artifact Registry for automatic synchronization with Vertex AI.
I'm using the @pipeline decorator (versus @dsl.pipeline seen in some examples) The Artifact Registry repository is configured in Kubeflow Pipeline format All required IAM permissions are in place The YAML file generation completes successfully
thanks you !
Upvotes: 1
Views: 142
Reputation: 452
Use .yaml
instead of .yml
for the extension of the compiled file.
PIPELINE_OUTPUT_PATH = "pipeline.yaml"
Upvotes: 0