pipelines
pipelines copied to clipboard
[frontend] artifacts not compiled in case of an afterwards error
given the following component
from kfp.v2.dsl import component, Output, Artifact
@component
def test(
artifact_url: Output[Artifact]
):
artifact_url.uri = 'gs://test/bucket/uri'
raise ValueError
artifact_url will not be compiled. Event though, the uri declaration is before the code error. questions a) would be possible to compile it? b) would be possible to compile it at execution time, before the component execution finishes?
Hi @iuiu34, could you share more on your compiler mode and version for this code snippet and possibly share more code? Thanks.
I run it in google-cloud vertex. Using google-cloud-aiplatform. But seems to me more a kfp general problem. Or is not the case?
kfp==1.8.11 google-cloud-aiplatform==1.10.0 from google.cloud import aiplatform
from kfp.v2.dsl import component, Output, Artifact
@component
def test(
artifact_url: Output[Artifact]
):
artifact_url.uri = 'gs://test/bucket/uri'
raise ValueError
@pipeline(
name=f'{image_name}-pipeline',
description='An example pipeline that performs arithmetic calculations.',
pipeline_root=bucket
)
def kfp_pipeline():
test()
print('kfp')
pipeline_filename = 'tmp/kfp_pipeline.json'
compiler.Compiler().compile(pipeline_func=pipeline,
package_path=pipeline_filename)
aiplatform.init()
job = aiplatform.PipelineJob(
display_name='test',
location='europe-west4',
template_path=pipeline_filename,
pipeline_root=bucket,
labels={'test_env': 'test_env'}
)
client, _ = google.auth.default()
job.run(service_account=client.service_account_email)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Please comment "/reopen" to reopen it.