-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying artifact regististry images with tags fails #2181
Comments
Thanks for the detailed report! I've filed this as an internal bug and I'll get back to you when I have further updates about this. |
For anyone finding this via google. I encountered a very similar error to this when trying to run a template as a pipeline job. Turns out that I was not specifying the service account in the job submit call. Adding the service account to that call (i.e job.submit(service_account=pipeline_service_account)) fixed the issue for me. |
I have also similar problem. Anyway in my understanding, the service account called in job.submit is for executing vertex ai but for call pipeline template. |
Any update on this? I seem to have the same issue |
BTW downloading the pipeline YAML from Artifact Registry via tag works fine using the KFP SDK registry functions |
Similarly it works fine using a curl request as per the docs |
A workaround for anyone with the same issue - first use the KFP SDK to resolve the tag to an exact version, then pass the exact version as import re
from kfp.registry import RegistryClient
from google.cloud import aiplatform
_VALID_AR_URL = re.compile(
r"https://([\w\-]+)-kfp\.pkg\.dev/([\w\-]+)/([\w\-]+)/([\w\-]+)/([\w\-.]+)",
re.IGNORECASE,
)
template_path = f"https://{region}-kfp.pkg.dev/{PROJECTID}/{REPOSITORY_NAME}/{PIPELINE_NAME}/{TAG}"
match = _VALID_AR_URL.match(template_path)
if match and "sha256:" not in template_path:
region = match.group(1)
project = match.group(2)
repo = match.group(3)
package_name = match.group(4)
tag = match.group(5)
host = f"https://{region}-kfp.pkg.dev/{project}/{repo}"
client = RegistryClient(host=host)
metadata = client.get_tag(package_name, tag)
version = metadata["version"][metadata["version"].find("sha256:") :]
template_path = f"{host}/{package_name}/{version}"
# Instantiate PipelineJob object
pl = aiplatform.pipeline_jobs.PipelineJob(
template_path=template_path,
...
) |
Creating a PipelineJob based on a artifact registry URI using a tag instead of a version raises an internal server error.
This is pretty annoying.
to be clear:
Using an artifact with sha256 version number works:
https://europe-west1-kfp.pkg.dev/my-project/my-project-kfp-template-repository/my-pipeline/sha256:3456789874334a...
Using a tag gives a 500 internal server error:
https://europe-west1-kfp.pkg.dev/my-project/my-project-kfp-template-repository/my-pipeline/my-tag
Using a tag that doesn't exist gives a 404 error when creating the PipelineJob
https://europe-west1-kfp.pkg.dev/my-project/my-project-kfp-template-repository/my-pipeline/my-non-existent-tag
All of this combined makes it seem like there's a bug for executing tagged artifacts.
Environment details
google-cloud-aiplatform
version: 1.24.1Steps to reproduce
Code example
This fails with a 500 internal server error on the "run" call.
This runs without problem:
Stack trace
The text was updated successfully, but these errors were encountered: