diff --git a/samples/core/loop_output/loop_output.py b/samples/core/loop_output/loop_output.py index 60148a991c..11ba4f35d1 100644 --- a/samples/core/loop_output/loop_output.py +++ b/samples/core/loop_output/loop_output.py @@ -13,10 +13,11 @@ # limitations under the License. from kfp import compiler, dsl +from typing import List @dsl.component -def args_generator_op() -> str: +def args_generator_op() -> List[str]: return '[1.1, 1.2, 1.3]' diff --git a/samples/core/loop_parameter/loop_parameter.py b/samples/core/loop_parameter/loop_parameter.py index 9d3589a55c..f171589601 100644 --- a/samples/core/loop_parameter/loop_parameter.py +++ b/samples/core/loop_parameter/loop_parameter.py @@ -1,5 +1,4 @@ from kfp import compiler, dsl -from typing import List @dsl.component @@ -15,7 +14,7 @@ def concat_op(a: str, b: str) -> str: @dsl.component -def generate_op() -> List[str]: +def generate_op() -> str: import json return json.dumps([{'a': i, 'b': i * 10} for i in range(1, 5)]) diff --git a/scripts/deploy/github/test-dynamic-loop.sh b/scripts/deploy/github/test-dynamic-loop.sh index 125a5584aa..016a9b7cfb 100755 --- a/scripts/deploy/github/test-dynamic-loop.sh +++ b/scripts/deploy/github/test-dynamic-loop.sh @@ -19,7 +19,7 @@ if [[ ! -d "$C_DIR" ]]; then C_DIR="$PWD"; fi source "${C_DIR}/test-pipeline.sh" RESULT=0 -run_test_case "dynamic-loop" "samples/core/loop_parameter/loop_parameter.py" "SUCCEEDED" 20 || RESULT=$? +run_test_case "loop_output" "samples/core/loop_output/loop_output.py" "SUCCEEDED" 20 || RESULT=$? STATUS_MSG=PASSED if [[ "$RESULT" -ne 0 ]]; then