pipelines
pipelines copied to clipboard
[bug] Nested pipelines fail to run
I'm trying to run the "Pipelines as Components" example from the documentation, but it seems I'm not able to run it successfully. it always compile, but it always produces an error after the subpipeline is executed properly. Looking at the logs of the pod that produces the error, I can see:
driver.DAG(pipelineName=superpipeline, runID=525fd190-491a-42c1-9558-65772a931637, task="square-and-multiply", component="comp-square-and-multiply", dagExecutionID=237, componentSpec) failed: failed to resolve inputs: resolving input parameter a with spec task_output_parameter:{producer_task:"square-and-sum" output_parameter_key:"Output"}: cannot find output parameter key "Output" in producer task "square-and-sum"
Is there a different way to access the output of a "pipeline as component"?
Environment
Using a kind cluster created with: kind create cluster --name kfp
- How do you deploy Kubeflow Pipelines (KFP)?
export PIPELINE_VERSION=2.0.1
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=$PIPELINE_VERSION"
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/env/dev?ref=$PIPELINE_VERSION"
- KFP version: 2.0.1
- KFP SDK version: kfp 2.2.0 kfp-pipeline-spec 0.2.2 kfp-server-api 2.0.1
Steps to reproduce
from kfp import dsl
from kfp.client import Client
@dsl.component
def square(x: float) -> float:
return x ** 2
@dsl.component
def add(x: float, y: float) -> float:
return x + y
@dsl.component
def square_root(x: float) -> float:
return x ** .5
@dsl.pipeline
def square_and_sum(a: float, b: float) -> float:
a_sq_task = square(x=a)
b_sq_task = square(x=b)
return add(x=a_sq_task.output, y=b_sq_task.output).output
@dsl.pipeline
def pythagorean(a: float = 1.2, b: float = 1.2) -> float:
sq_and_sum_task = square_and_sum(a=a, b=b)
return square_root(x=sq_and_sum_task.output).output
if __name__ == "__main__":
client = Client()
run = client.create_run_from_pipeline_func(
pipeline_func=pythagorean,
experiment_name="pythagorean-2",
enable_caching=False,
arguments={
'a': 3.5,
'b': 4.5,
},
run_name="pythagorean-run-3"
)
I also tried to explicitly access the output with
return square_root(x=sq_and_sum_task.outputs['Output']).output
but I get the same error
Expected result
Successfull execution
Materials and reference
Labels
Impacted by this bug? Give it a 👍.
/assign @chensun
I can reproduce this, looks like a backend bug.
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 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.
I'm still seeing this issue on kfp 2.7, anyone else? @JosepSampe @chensun
/reopen
@KyleKaminky: You can't reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/reopen
@JosepSampe: Reopened this issue.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
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.