admin管理员组文章数量:1435859
Problem Statement
I'm encountering a 400 (Bad Request) error when attempting to upload a Kubeflow pipeline to Google Artifact Registry.
Environment Setup
kfp==2.10.1
kfp-pipeline-spec==0.5.0
Configuration
Repository Format: Kubeflow Pipeline IAM: artifactregistry.writer role and artifactregistry.admin roleconfigured Region: europe-west1
Reproducible Code Example
1. Initial Setup
(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 = "/my_project/ml-pipeline"
PIPELINE_OUTPUT_PATH = "pipeline.yml"
2. Pipeline Definition
@dsl.pipeline(
name="example_pipeline",
description="Example pipeline to demonstrate upload to Artifact Registry"
)
def my_pipeline():
\# Pipeline definition here
pass
3. Compilation and Upload
python
Compilation
pipeline_func=my_pipeline,
package_path=PIPELINE_OUTPUT_PATH
)
Upload
client = RegistryClient(host=ARTIFACT_REGISTRY_URL)
client.upload_pipeline(file_name=PIPELINE_OUTPUT_PATH)
Error Message
HTTPError: 400 Client Error: Bad Request for url: /my_project/ml-pipeline
Specific Questions
- Are there any missing steps in the repository configuration?
- How can I better debug this HTTP 400 error?
Troubleshooting Steps Taken
✅ Verified pipeline.yml file generation
- File generates without errors
- YAML structure appears valid
- No compilation errors reported
✅ Checked IAM permissions
- Confirmed artifactregistry.writer role
- User account has necessary access
- Service account permissions verified
✅ Validated repository URL
- URL format matches documentation
- Repository exists and is accessible
- Region configuration is correct
End Goal
Automate the upload of pipeline updates to Artifact Registry for automatic synchronization with Vertex AI.
Additional Context
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 !
Problem Statement
I'm encountering a 400 (Bad Request) error when attempting to upload a Kubeflow pipeline to Google Artifact Registry.
Environment Setup
kfp==2.10.1
kfp-pipeline-spec==0.5.0
Configuration
Repository Format: Kubeflow Pipeline IAM: artifactregistry.writer role and artifactregistry.admin roleconfigured Region: europe-west1
Reproducible Code Example
1. Initial Setup
(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"
2. Pipeline Definition
@dsl.pipeline(
name="example_pipeline",
description="Example pipeline to demonstrate upload to Artifact Registry"
)
def my_pipeline():
\# Pipeline definition here
pass
3. Compilation and Upload
python
Compilation
pipeline_func=my_pipeline,
package_path=PIPELINE_OUTPUT_PATH
)
Upload
client = RegistryClient(host=ARTIFACT_REGISTRY_URL)
client.upload_pipeline(file_name=PIPELINE_OUTPUT_PATH)
Error Message
HTTPError: 400 Client Error: Bad Request for url: https://europe-west1-kfp.pkg.dev/my_project/ml-pipeline
Specific Questions
- Are there any missing steps in the repository configuration?
- How can I better debug this HTTP 400 error?
Troubleshooting Steps Taken
✅ Verified pipeline.yml file generation
- File generates without errors
- YAML structure appears valid
- No compilation errors reported
✅ Checked IAM permissions
- Confirmed artifactregistry.writer role
- User account has necessary access
- Service account permissions verified
✅ Validated repository URL
- URL format matches documentation
- Repository exists and is accessible
- Region configuration is correct
End Goal
Automate the upload of pipeline updates to Artifact Registry for automatic synchronization with Vertex AI.
Additional Context
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 !
Share Improve this question asked Nov 17, 2024 at 17:26 EliotEliot 112 bronze badges 3 |1 Answer
Reset to default 0Use .yaml
instead of .yml
for the extension of the compiled file.
PIPELINE_OUTPUT_PATH = "pipeline.yaml"
版权声明:本文标题:HTTP 400 Error when uploading Kubeflow Pipeline to Artifact Registry [google cloud platform] - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745629638a2667191.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
my_project
containing aKFP
repository ineurope-west1
?). One debugging step you could try is to upload your artifact using a tool likecurl
, this will eliminate your Python code from the configuration. See example curl request. You'll need to impersonate the service account – DazWilkin Commented Nov 17, 2024 at 17:43auth
property onkfp.registry.RegistryClient
which isn't being set (unless it's leveraging ADC?) – DazWilkin Commented Nov 17, 2024 at 19:48gcloud auth application-default login and
– Eliot Commented Nov 18, 2024 at 1:15