Skip to content

Commit

Permalink
SDK/Components - More meaningful error when trying to convert graph c…
Browse files Browse the repository at this point in the history
…omponent to ContainerOp (#710)
  • Loading branch information
Ark-kun authored and k8s-ci-robot committed Jan 25, 2019
1 parent a53cb58 commit 4457e7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/python/kfp/components/_dsl_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def create_container_op_from_task(task_spec: TaskSpec):
argument_values = task_spec.arguments
component_spec = task_spec.component_ref._component_spec

if hasattr(component_spec.implementation, 'graph'):
raise TypeError('Cannot convert graph component to ContainerOp')

inputs_dict = {input_spec.name: input_spec for input_spec in component_spec.inputs or []}
container_spec = component_spec.implementation.container

Expand Down

0 comments on commit 4457e7e

Please sign in to comment.