Comments (7)
I have also similar problem.
In my case, the service account for setting to job.submit needs to have roles/artifactregistry.reader
to the target artifact registry for uploading pipeline template.
Anyway in my understanding, the service account called in job.submit is for executing vertex ai but for call pipeline template.
from python-aiplatform.
Any update on this? I seem to have the same issue
from python-aiplatform.
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 template_path
:
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,
...
)
from python-aiplatform.
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.
from python-aiplatform.
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.
from python-aiplatform.
BTW downloading the pipeline YAML from Artifact Registry via tag works fine using the KFP SDK registry functions
from python-aiplatform.
Similarly it works fine using a curl request as per the docs
from python-aiplatform.
Related Issues (20)
- tests.system.aiplatform.test_e2e_tabular.TestEndToEndTabular: test_end_to_end_tabular failed HOT 2
- tests.system.aiplatform.test_language_models.TestLanguageModels: test_batch_prediction_for_text_generation[grpc] failed HOT 3
- tests.system.aiplatform.test_language_models.TestLanguageModels: test_batch_prediction_for_text_generation[rest] failed HOT 4
- tests.system.aiplatform.test_language_models.TestLanguageModels: test_batch_prediction_for_textembedding[grpc] failed HOT 3
- tests.system.aiplatform.test_language_models.TestLanguageModels: test_batch_prediction_for_textembedding[rest] failed HOT 3
- tests.system.aiplatform.test_language_models.TestLanguageModels: test_batch_prediction_for_code_generation[grpc] failed HOT 3
- tests.system.aiplatform.test_language_models.TestLanguageModels: test_batch_prediction_for_code_generation[rest] failed HOT 3
- tests.system.aiplatform.test_language_models.TestLanguageModels: many tests failed HOT 9
- tests.system.vertexai.test_pytorch.TestRemoteExecutionPytorch: test_remote_execution_pytorch failed HOT 1
- tests.system.aiplatform.test_experiment_model.TestExperimentModel: test_deploy_model_with_cpu_container failed HOT 1
- function_call.args type MapComposite instead of Struct HOT 3
- tests.system.vertexai.test_generative_models.TestGenerativeModels: test_grounding_google_search_retriever failed HOT 2
- Add support to pass metadata from GenerativeModel.generate_content and Chat:send_message HOT 1
- The build failed HOT 1
- Add support to pass metadata from TextEmbeddingModel.from_pretrained and TextEmbeddingModel.get_embeddings
- Add support to pass metadata from TextEmbeddingModel.from_pretrained and TextEmbeddingModel.get_embeddings(
- gemini-1.0-pro-001 raises ValueError: Content roles do not match: model != HOT 8
- tests.system.aiplatform.test_prediction_cpr.TestPredictionCpr: test_build_cpr_model_upload_and_deploy failed HOT 1
- tests.system.vertex_ray.test_ray_data.TestRayData: test_ray_data[2.4] failed HOT 1
- tests.system.vertex_ray.test_ray_data.TestRayData: test_ray_data[2.9] failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-aiplatform.