diff --git a/backend/src/cache/server/mutation_test.go b/backend/src/cache/server/mutation_test.go index 9568b8090ae2..65b4582d1853 100644 --- a/backend/src/cache/server/mutation_test.go +++ b/backend/src/cache/server/mutation_test.go @@ -52,7 +52,7 @@ var ( Command: []string{"python"}, Env: []corev1.EnvVar{{ Name: ArgoWorkflowTemplateEnvKey, - Value: `{"name": "Does not matter","container":{"command":["echo", "Hello"],"image":"python:3.7"}}`, + Value: `{"name": "Does not matter","container":{"command":["echo", "Hello"],"image":"python:3.9"}}`, }}, }, }, @@ -169,9 +169,9 @@ func TestMutatePodIfCached(t *testing.T) { func TestMutatePodIfCachedWithCacheEntryExist(t *testing.T) { executionCache := &model.ExecutionCache{ - ExecutionCacheKey: "f5fe913be7a4516ebfe1b5de29bcb35edd12ecc776b2f33f10ca19709ea3b2f0", + ExecutionCacheKey: "1933d178a14bc415466cfd1b3ca2100af975e8c59e1ff9d502fcf18eb5cbd7f7", ExecutionOutput: "testOutput", - ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.7"}}`, + ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.9"}}`, MaxCacheStaleness: -1, } fakeClientManager.CacheStore().CreateExecutionCache(executionCache) @@ -188,9 +188,9 @@ func TestMutatePodIfCachedWithCacheEntryExist(t *testing.T) { func TestDefaultImage(t *testing.T) { executionCache := &model.ExecutionCache{ - ExecutionCacheKey: "f5fe913be7a4516ebfe1b5de29bcb35edd12ecc776b2f33f10ca19709ea3b2f0", + ExecutionCacheKey: "1933d178a14bc415466cfd1b3ca2100af975e8c59e1ff9d502fcf18eb5cbd7f7", ExecutionOutput: "testOutput", - ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.7"}}`, + ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.9"}}`, MaxCacheStaleness: -1, } fakeClientManager.CacheStore().CreateExecutionCache(executionCache) @@ -209,7 +209,7 @@ func TestSetImage(t *testing.T) { executionCache := &model.ExecutionCache{ ExecutionCacheKey: "f5fe913be7a4516ebfe1b5de29bcb35edd12ecc776b2f33f10ca19709ea3b2f0", ExecutionOutput: "testOutput", - ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.7"}}`, + ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.9"}}`, MaxCacheStaleness: -1, } fakeClientManager.CacheStore().CreateExecutionCache(executionCache) @@ -226,7 +226,7 @@ func TestCacheNodeRestriction(t *testing.T) { executionCache := &model.ExecutionCache{ ExecutionCacheKey: "f5fe913be7a4516ebfe1b5de29bcb35edd12ecc776b2f33f10ca19709ea3b2f0", ExecutionOutput: "testOutput", - ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.7"},"nodeSelector":{"disktype":"ssd"}}`, + ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.9"},"nodeSelector":{"disktype":"ssd"}}`, MaxCacheStaleness: -1, } fakeClientManager.CacheStore().CreateExecutionCache(executionCache) @@ -239,9 +239,9 @@ func TestCacheNodeRestriction(t *testing.T) { func TestMutatePodIfCachedWithTeamplateCleanup(t *testing.T) { executionCache := &model.ExecutionCache{ - ExecutionCacheKey: "5a20e3f2e74863b363291953082d9812a58e25f7117bface1c76d40ef0ee88fc", + ExecutionCacheKey: "c81988503d55a5817d79bd972017d95c37f72b024e522b4d79787d9f599c0725", ExecutionOutput: "testOutput", - ExecutionTemplate: `Cache key was calculated from this: {"container":{"command":["echo", "Hello"],"image":"python:3.7"},"outputs":"anything"}`, + ExecutionTemplate: `Cache key was calculated from this: {"container":{"command":["echo", "Hello"],"image":"python:3.9"},"outputs":"anything"}`, MaxCacheStaleness: -1, } fakeClientManager.CacheStore().CreateExecutionCache(executionCache) diff --git a/backend/src/v2/compiler/argocompiler/testdata/create_mount_delete_dynamic_pvc.yaml b/backend/src/v2/compiler/argocompiler/testdata/create_mount_delete_dynamic_pvc.yaml index 7a5565595ed3..25b078fa55da 100644 --- a/backend/src/v2/compiler/argocompiler/testdata/create_mount_delete_dynamic_pvc.yaml +++ b/backend/src/v2/compiler/argocompiler/testdata/create_mount_delete_dynamic_pvc.yaml @@ -8,9 +8,9 @@ spec: parameters: - name: kubernetes-comp-comp value: '{"pvcMount":[{"mountPath":"/data","taskOutputParameter":{"outputParameterKey":"name","producerTask":"createpvc"}}]}' - - name: components-95f802401136aebf1bf728a6675d7adba5513b53673a3698e00a6d8744638080 + - name: components-b34273359995b3746ecf1bb58ac4bd6c54d47b6fdc35b013bb7962946f322a19 value: '{"executorLabel":"exec-comp"}' - - name: implementations-95f802401136aebf1bf728a6675d7adba5513b53673a3698e00a6d8744638080 + - name: implementations-b34273359995b3746ecf1bb58ac4bd6c54d47b6fdc35b013bb7962946f322a19 value: '{"args":["--executor_input","{{$}}","--function_to_execute","comp"],"command":["sh","-c","\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip || python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1 @@ -18,7 +18,7 @@ spec: \u0026\u0026 \"$0\" \"$@\"\n","sh","-ec","program_path=$(mktemp -d) printf \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\" python3 -m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\" ","\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import - *\n\ndef comp():\n pass\n\n"],"image":"python:3.7"}' + *\n\ndef comp():\n pass\n\n"],"image":"python:3.9"}' - name: kubernetes-comp-comp-2 value: '{"pvcMount":[{"mountPath":"/reused_data","taskOutputParameter":{"outputParameterKey":"name","producerTask":"createpvc"}}]}' - name: components-98f254581598234b59377784d6cbf209de79e0bcda8013fe4c4397b5d3a26767 @@ -197,11 +197,11 @@ spec: - arguments: parameters: - name: component - value: '{{workflow.parameters.components-95f802401136aebf1bf728a6675d7adba5513b53673a3698e00a6d8744638080}}' + value: '{{workflow.parameters.components-b34273359995b3746ecf1bb58ac4bd6c54d47b6fdc35b013bb7962946f322a19}}' - name: task value: '{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-comp"},"dependentTasks":["createpvc"],"taskInfo":{"name":"comp"}}' - name: container - value: '{{workflow.parameters.implementations-95f802401136aebf1bf728a6675d7adba5513b53673a3698e00a6d8744638080}}' + value: '{{workflow.parameters.implementations-b34273359995b3746ecf1bb58ac4bd6c54d47b6fdc35b013bb7962946f322a19}}' - name: parent-dag-id value: '{{inputs.parameters.parent-dag-id}}' - name: kubernetes-config @@ -222,11 +222,11 @@ spec: - arguments: parameters: - name: component - value: '{{workflow.parameters.components-95f802401136aebf1bf728a6675d7adba5513b53673a3698e00a6d8744638080}}' + value: '{{workflow.parameters.components-b34273359995b3746ecf1bb58ac4bd6c54d47b6fdc35b013bb7962946f322a19}}' - name: task value: '{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-comp-2"},"dependentTasks":["comp","createpvc"],"taskInfo":{"name":"comp-2"}}' - name: container - value: '{{workflow.parameters.implementations-95f802401136aebf1bf728a6675d7adba5513b53673a3698e00a6d8744638080}}' + value: '{{workflow.parameters.implementations-b34273359995b3746ecf1bb58ac4bd6c54d47b6fdc35b013bb7962946f322a19}}' - name: parent-dag-id value: '{{inputs.parameters.parent-dag-id}}' - name: kubernetes-config diff --git a/backend/src/v2/compiler/argocompiler/testdata/create_pod_metadata.yaml b/backend/src/v2/compiler/argocompiler/testdata/create_pod_metadata.yaml index 67308ba33dda..7736012a09e4 100644 --- a/backend/src/v2/compiler/argocompiler/testdata/create_pod_metadata.yaml +++ b/backend/src/v2/compiler/argocompiler/testdata/create_pod_metadata.yaml @@ -8,15 +8,15 @@ spec: parameters: - name: kubernetes-comp-hello-world value: '{"podMetadata":{"annotations":{"experiment_id":"234567","run_id":"123456"},"labels":{"kubeflow.com/common":"test","kubeflow.com/kfp":"pipeline-node"}}}' - - name: components-34e222d692a0573c88000b8cb02ad24423491a53e061e9bba36d3718dd4c3390 + - name: components-203fce8adabe0cfa7da54b9d3ff79c772136c926974659b51c378727c7ccdfb7 value: '{"executorLabel":"exec-hello-world","inputDefinitions":{"parameters":{"text":{"type":"STRING"}}}}' - - name: implementations-34e222d692a0573c88000b8cb02ad24423491a53e061e9bba36d3718dd4c3390 + - name: implementations-203fce8adabe0cfa7da54b9d3ff79c772136c926974659b51c378727c7ccdfb7 value: '{"args":["--text","{{$.inputs.parameters[''text'']}}"],"command":["sh","-ec","program_path=$(mktemp)\nprintf \"%s\" \"$0\" \u003e \"$program_path\"\npython3 -u \"$program_path\" \"$@\"\n","def hello_world(text):\n print(text)\n return text\n\nimport argparse\n_parser = argparse.ArgumentParser(prog=''Hello world'', description='''')\n_parser.add_argument(\"--text\", dest=\"text\", type=str, required=True, default=argparse.SUPPRESS)\n_parsed_args - = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"],"image":"python:3.7"}' + = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"],"image":"python:3.9"}' - name: components-root value: '{"dag":{"tasks":{"hello-world":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-hello-world"},"inputs":{"parameters":{"text":{"componentInputParameter":"text"}}},"taskInfo":{"name":"hello-world"}}}},"inputDefinitions":{"parameters":{"text":{"type":"STRING"}}}}' entrypoint: entrypoint @@ -191,11 +191,11 @@ spec: - arguments: parameters: - name: component - value: '{{workflow.parameters.components-34e222d692a0573c88000b8cb02ad24423491a53e061e9bba36d3718dd4c3390}}' + value: '{{workflow.parameters.components-203fce8adabe0cfa7da54b9d3ff79c772136c926974659b51c378727c7ccdfb7}}' - name: task value: '{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-hello-world"},"inputs":{"parameters":{"text":{"componentInputParameter":"text"}}},"taskInfo":{"name":"hello-world"}}' - name: container - value: '{{workflow.parameters.implementations-34e222d692a0573c88000b8cb02ad24423491a53e061e9bba36d3718dd4c3390}}' + value: '{{workflow.parameters.implementations-203fce8adabe0cfa7da54b9d3ff79c772136c926974659b51c378727c7ccdfb7}}' - name: parent-dag-id value: '{{inputs.parameters.parent-dag-id}}' - name: kubernetes-config diff --git a/backend/src/v2/compiler/argocompiler/testdata/hello_world.yaml b/backend/src/v2/compiler/argocompiler/testdata/hello_world.yaml index 6bc59366d8d9..af2e8eebd216 100644 --- a/backend/src/v2/compiler/argocompiler/testdata/hello_world.yaml +++ b/backend/src/v2/compiler/argocompiler/testdata/hello_world.yaml @@ -6,15 +6,15 @@ metadata: spec: arguments: parameters: - - name: components-34e222d692a0573c88000b8cb02ad24423491a53e061e9bba36d3718dd4c3390 + - name: components-203fce8adabe0cfa7da54b9d3ff79c772136c926974659b51c378727c7ccdfb7 value: '{"executorLabel":"exec-hello-world","inputDefinitions":{"parameters":{"text":{"type":"STRING"}}}}' - - name: implementations-34e222d692a0573c88000b8cb02ad24423491a53e061e9bba36d3718dd4c3390 + - name: implementations-203fce8adabe0cfa7da54b9d3ff79c772136c926974659b51c378727c7ccdfb7 value: '{"args":["--text","{{$.inputs.parameters[''text'']}}"],"command":["sh","-ec","program_path=$(mktemp)\nprintf \"%s\" \"$0\" \u003e \"$program_path\"\npython3 -u \"$program_path\" \"$@\"\n","def hello_world(text):\n print(text)\n return text\n\nimport argparse\n_parser = argparse.ArgumentParser(prog=''Hello world'', description='''')\n_parser.add_argument(\"--text\", dest=\"text\", type=str, required=True, default=argparse.SUPPRESS)\n_parsed_args - = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"],"image":"python:3.7"}' + = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"],"image":"python:3.9"}' - name: components-root value: '{"dag":{"tasks":{"hello-world":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-hello-world"},"inputs":{"parameters":{"text":{"componentInputParameter":"text"}}},"taskInfo":{"name":"hello-world"}}}},"inputDefinitions":{"parameters":{"text":{"type":"STRING"}}}}' entrypoint: entrypoint @@ -183,11 +183,11 @@ spec: - arguments: parameters: - name: component - value: '{{workflow.parameters.components-34e222d692a0573c88000b8cb02ad24423491a53e061e9bba36d3718dd4c3390}}' + value: '{{workflow.parameters.components-203fce8adabe0cfa7da54b9d3ff79c772136c926974659b51c378727c7ccdfb7}}' - name: task value: '{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-hello-world"},"inputs":{"parameters":{"text":{"componentInputParameter":"text"}}},"taskInfo":{"name":"hello-world"}}' - name: container - value: '{{workflow.parameters.implementations-34e222d692a0573c88000b8cb02ad24423491a53e061e9bba36d3718dd4c3390}}' + value: '{{workflow.parameters.implementations-203fce8adabe0cfa7da54b9d3ff79c772136c926974659b51c378727c7ccdfb7}}' - name: parent-dag-id value: '{{inputs.parameters.parent-dag-id}}' name: hello-world-driver diff --git a/backend/src/v2/compiler/tektoncompiler/testdata/exit_handler.yaml b/backend/src/v2/compiler/tektoncompiler/testdata/exit_handler.yaml index 359e8fcb1653..30f68e10b7ab 100755 --- a/backend/src/v2/compiler/tektoncompiler/testdata/exit_handler.yaml +++ b/backend/src/v2/compiler/tektoncompiler/testdata/exit_handler.yaml @@ -49,7 +49,7 @@ spec: -d)\nprintf \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3 -m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import - *\n\ndef print_op(message: str):\n \"\"\"Prints a message.\"\"\"\n print(message)\n\n"],"image":"python:3.7"}' + *\n\ndef print_op(message: str):\n \"\"\"Prints a message.\"\"\"\n print(message)\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -210,7 +210,7 @@ spec: \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3 -m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef - fail_op(message: str):\n \"\"\"Fails.\"\"\"\n import sys\n print(message)\n sys.exit(1)\n\n"],"image":"python:3.7"}' + fail_op(message: str):\n \"\"\"Fails.\"\"\"\n import sys\n print(message)\n sys.exit(1)\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -352,7 +352,7 @@ spec: \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3 -m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef - print_op(message: str):\n \"\"\"Prints a message.\"\"\"\n print(message)\n\n"],"image":"python:3.7"}' + print_op(message: str):\n \"\"\"Prints a message.\"\"\"\n print(message)\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config diff --git a/backend/src/v2/compiler/tektoncompiler/testdata/hello_world.yaml b/backend/src/v2/compiler/tektoncompiler/testdata/hello_world.yaml index 5ff819980bc6..bd0ab351ce57 100644 --- a/backend/src/v2/compiler/tektoncompiler/testdata/hello_world.yaml +++ b/backend/src/v2/compiler/tektoncompiler/testdata/hello_world.yaml @@ -31,7 +31,7 @@ spec: hello_world(text):\n print(text)\n return text\n\nimport argparse\n_parser = argparse.ArgumentParser(prog=''Hello world'', description='''')\n_parser.add_argument(\"--text\", dest=\"text\", type=str, required=True, default=argparse.SUPPRESS)\n_parsed_args - = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"],"image":"python:3.7"}' + = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config diff --git a/backend/src/v2/compiler/tektoncompiler/testdata/loop_static.yaml b/backend/src/v2/compiler/tektoncompiler/testdata/loop_static.yaml index 5bfe1cfdd018..30b35248cd58 100644 --- a/backend/src/v2/compiler/tektoncompiler/testdata/loop_static.yaml +++ b/backend/src/v2/compiler/tektoncompiler/testdata/loop_static.yaml @@ -78,7 +78,7 @@ spec: -m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef concat_op(a: str, b: str) -\u003e str:\n print(a + b)\n return - a + b\n\n"],"image":"python:3.7"}' + a + b\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -219,7 +219,7 @@ spec: -m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef print_op(text: str) -\u003e str:\n print(text)\n return - text\n\n"],"image":"python:3.7"}' + text\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -406,7 +406,7 @@ spec: \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3 -m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef - print_op(text: str) -\u003e str:\n print(text)\n return text\n\n"],"image":"python:3.7"}' + print_op(text: str) -\u003e str:\n print(text)\n return text\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config diff --git a/backend/src/v2/compiler/tektoncompiler/testdata/mnist_pipeline.yaml b/backend/src/v2/compiler/tektoncompiler/testdata/mnist_pipeline.yaml index 8151b8f08f37..559d460b1a2d 100755 --- a/backend/src/v2/compiler/tektoncompiler/testdata/mnist_pipeline.yaml +++ b/backend/src/v2/compiler/tektoncompiler/testdata/mnist_pipeline.yaml @@ -37,7 +37,7 @@ spec: convert_experiment_spec_to_str(experiment_spec_json: Dict[str, str])-\u003e NamedTuple(''Outputs'', [(''experiment_spec_str_output'', str)]):\n import json\n output = NamedTuple(''Outputs'', [(''experiment_spec_str_output'', - str)])\n return output(json.dumps(experiment_spec_json))\n\n"],"image":"python:3.7"}' + str)])\n return output(json.dumps(experiment_spec_json))\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -188,7 +188,7 @@ spec: pa[\"name\"] == \"learning_rate\":\n best_hps.append(\"--tf-learning-rate=\" + pa[\"value\"])\n elif pa[\"name\"] == \"batch_size\":\n best_hps.append(\"--tf-batch-size=\" + pa[\"value\"])\n print(\"Best Hyperparameters: {}\".format(best_hps))\n return - \" \".join(best_hps)\n\n"],"image":"python:3.7"}' + \" \".join(best_hps)\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -812,7 +812,7 @@ spec: [\n \"python /opt/model.py --tf-export-dir=/mnt/export --tf-train-steps={} {}\".format(training_steps, best_hps) \n ],\n }\n ],\n }\n }\n }\n\n output = NamedTuple(''Outputs'', [(''chief_spec'', Dict[str, str]), (''worker_spec'', - Dict[str, str])])\n return output(tfjob_chief_spec, tfjob_worker_spec)\n\n"],"image":"python:3.7"}' + Dict[str, str])])\n return output(tfjob_chief_spec, tfjob_worker_spec)\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -987,7 +987,7 @@ spec: kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef convert_inference_service_to_artifact(inferenceservice_yaml: Dict[str, str], inferenceservice_artifact: Output[Artifact]):\n import json\n with - open(inferenceservice_artifact.path, ''w'') as f:\n f.write(json.dumps(inferenceservice_yaml))\n\n"],"image":"python:3.7"}' + open(inferenceservice_artifact.path, ''w'') as f:\n f.write(json.dumps(inferenceservice_yaml))\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -1138,7 +1138,7 @@ spec: {\n \"sidecar.istio.io/inject\": \"false\"\n }\n },\n \"spec\":{\n \"predictor\":{\n \"tensorflow\": {\n \"storageUri\": \"pvc://{}/\".format(model_volume_name)\n }\n }\n }\n }\n\n output = NamedTuple(''Outputs'', [(''inferenceservice_yaml'', Dict[str, str])])\n return - output(inference_service)\n\n"],"image":"python:3.7"}' + output(inference_service)\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config diff --git a/backend/src/v2/compiler/tektoncompiler/testdata/nestedloop.yaml b/backend/src/v2/compiler/tektoncompiler/testdata/nestedloop.yaml index 86d26068a149..877b86d5cb61 100644 --- a/backend/src/v2/compiler/tektoncompiler/testdata/nestedloop.yaml +++ b/backend/src/v2/compiler/tektoncompiler/testdata/nestedloop.yaml @@ -36,7 +36,7 @@ spec: kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef flip_coin_op() -\u003e str:\n \"\"\"Flip a coin and output heads or tails randomly.\"\"\"\n import random\n result = random.choice([''heads'', - ''tails''])\n print(result)\n return result\n\n"],"image":"python:3.7"}' + ''tails''])\n print(result)\n return result\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -228,7 +228,7 @@ spec: -d)\nprintf \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3 -m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import - *\n\ndef print_op(message: str):\n \"\"\"Print a message.\"\"\"\n print(message)\n\n"],"image":"python:3.7"}' + *\n\ndef print_op(message: str):\n \"\"\"Print a message.\"\"\"\n print(message)\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -424,7 +424,7 @@ spec: -d)\nprintf \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3 -m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import - *\n\ndef print_op(message: str):\n \"\"\"Print a message.\"\"\"\n print(message)\n\n"],"image":"python:3.7"}' + *\n\ndef print_op(message: str):\n \"\"\"Print a message.\"\"\"\n print(message)\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config @@ -621,7 +621,7 @@ spec: *\n\ndef get_random_int_op(minimum: int, maximum: int) -\u003e int:\n \"\"\"Generate a random number between minimum and maximum (inclusive).\"\"\"\n import random\n result = random.randint(minimum, maximum)\n print(result)\n return - result\n\n"],"image":"python:3.7"}' + result\n\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config diff --git a/backend/src/v2/compiler/tektoncompiler/testdata/pod_metadata.yaml b/backend/src/v2/compiler/tektoncompiler/testdata/pod_metadata.yaml index 44ca1c33b96d..1dfeb2012eac 100644 --- a/backend/src/v2/compiler/tektoncompiler/testdata/pod_metadata.yaml +++ b/backend/src/v2/compiler/tektoncompiler/testdata/pod_metadata.yaml @@ -31,7 +31,7 @@ spec: hello_world(text):\n print(text)\n return text\n\nimport argparse\n_parser = argparse.ArgumentParser(prog=''Hello world'', description='''')\n_parser.add_argument(\"--text\", dest=\"text\", type=str, required=True, default=argparse.SUPPRESS)\n_parsed_args - = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"],"image":"python:3.7"}' + = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"],"image":"python:3.9"}' - name: iteration-index value: "" - name: kubernetes-config diff --git a/backend/src/v2/driver/driver_test.go b/backend/src/v2/driver/driver_test.go index be64723ccfb5..130291f3cac7 100644 --- a/backend/src/v2/driver/driver_test.go +++ b/backend/src/v2/driver/driver_test.go @@ -50,7 +50,7 @@ func Test_initPodSpecPatch_acceleratorConfig(t *testing.T) { "Valid - nvidia.com/gpu", args{ &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec{ - Image: "python:3.7", + Image: "python:3.9", Args: []string{"--function_to_execute", "add"}, Command: []string{"sh", "-ec", "python3 -m kfp.components.executor_main"}, Resources: &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec{ @@ -89,7 +89,7 @@ func Test_initPodSpecPatch_acceleratorConfig(t *testing.T) { "Valid - amd.com/gpu", args{ &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec{ - Image: "python:3.7", + Image: "python:3.9", Args: []string{"--function_to_execute", "add"}, Command: []string{"sh", "-ec", "python3 -m kfp.components.executor_main"}, Resources: &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec{ @@ -128,7 +128,7 @@ func Test_initPodSpecPatch_acceleratorConfig(t *testing.T) { "Valid - cloud-tpus.google.com/v3", args{ &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec{ - Image: "python:3.7", + Image: "python:3.9", Args: []string{"--function_to_execute", "add"}, Command: []string{"sh", "-ec", "python3 -m kfp.components.executor_main"}, Resources: &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec{ @@ -167,7 +167,7 @@ func Test_initPodSpecPatch_acceleratorConfig(t *testing.T) { "Valid - cloud-tpus.google.com/v2", args{ &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec{ - Image: "python:3.7", + Image: "python:3.9", Args: []string{"--function_to_execute", "add"}, Command: []string{"sh", "-ec", "python3 -m kfp.components.executor_main"}, Resources: &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec{ @@ -206,7 +206,7 @@ func Test_initPodSpecPatch_acceleratorConfig(t *testing.T) { "Valid - custom string", args{ &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec{ - Image: "python:3.7", + Image: "python:3.9", Args: []string{"--function_to_execute", "add"}, Command: []string{"sh", "-ec", "python3 -m kfp.components.executor_main"}, Resources: &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec{ @@ -335,7 +335,7 @@ func Test_initPodSpecPatch_resourceRequests(t *testing.T) { "Valid - with requests", args{ &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec{ - Image: "python:3.7", + Image: "python:3.9", Args: []string{"--function_to_execute", "add"}, Command: []string{"sh", "-ec", "python3 -m kfp.components.executor_main"}, Resources: &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec{ @@ -371,7 +371,7 @@ func Test_initPodSpecPatch_resourceRequests(t *testing.T) { "Valid - zero requests", args{ &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec{ - Image: "python:3.7", + Image: "python:3.9", Args: []string{"--function_to_execute", "add"}, Command: []string{"sh", "-ec", "python3 -m kfp.components.executor_main"}, Resources: &pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec{ diff --git a/backend/update_requirements.sh b/backend/update_requirements.sh index 920940e90928..93c811f474d9 100755 --- a/backend/update_requirements.sh +++ b/backend/update_requirements.sh @@ -1,5 +1,5 @@ #!/bin/bash # This image should be in sync with Dockerfile. -IMAGE="python:3.7" +IMAGE="python:3.9" ../hack/update-requirements.sh $IMAGE requirements.txt