From 09408170e24c052b20cc8b9200b2addcc3e5d9b1 Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Thu, 16 Jul 2020 18:55:08 -0700 Subject: [PATCH] Removed the launcherOptions for now --- .../structures/components.json_schema.json | 3 +- .../components.json_schema.outline.yaml | 1 - .../components/structures/components.proto | 1 - .../components_tests/test_graph_components.py | 64 ------------------- 4 files changed, 1 insertion(+), 68 deletions(-) diff --git a/sdk/python/kfp/components/structures/components.json_schema.json b/sdk/python/kfp/components/structures/components.json_schema.json index 6b9797be3c86..dfda1b066158 100644 --- a/sdk/python/kfp/components/structures/components.json_schema.json +++ b/sdk/python/kfp/components/structures/components.json_schema.json @@ -322,8 +322,7 @@ "type": "object", "properties": { "retryStrategy": {"$ref": "#/definitions/RetryStrategySpec"}, - "cachingStrategy": {"$ref": "#/definitions/CachingStrategySpec"}, - "launcherOptions": {"type": "object"} + "cachingStrategy": {"$ref": "#/definitions/CachingStrategySpec"} }, "additionalProperties": false }, diff --git a/sdk/python/kfp/components/structures/components.json_schema.outline.yaml b/sdk/python/kfp/components/structures/components.json_schema.outline.yaml index 6d9851be6852..2b4087df7097 100644 --- a/sdk/python/kfp/components/structures/components.json_schema.outline.yaml +++ b/sdk/python/kfp/components/structures/components.json_schema.outline.yaml @@ -67,4 +67,3 @@ maxRetries: integer cachingStrategy: #CachingStrategySpec maxCacheStaleness: string - launcherOptions: #Map str -> Any diff --git a/sdk/python/kfp/components/structures/components.proto b/sdk/python/kfp/components/structures/components.proto index c9f5ada81c28..096f6bb00955 100644 --- a/sdk/python/kfp/components/structures/components.proto +++ b/sdk/python/kfp/components/structures/components.proto @@ -213,5 +213,4 @@ message RetryStrategySpec { // Optional configuration that specifies how the task should be executed. Can be used to set some platform-specific options. message ExecutionOptionsSpec { RetryStrategySpec retryStrategy = 1; - map launcherOptions = 2; } diff --git a/sdk/python/kfp/components_tests/test_graph_components.py b/sdk/python/kfp/components_tests/test_graph_components.py index d765d42ee627..e57de2159c82 100644 --- a/sdk/python/kfp/components_tests/test_graph_components.py +++ b/sdk/python/kfp/components_tests/test_graph_components.py @@ -143,70 +143,6 @@ def test_handle_parsing_task_execution_options_caching_strategy(self): component_spec = ComponentSpec.from_dict(struct) self.assertEqual(component_spec.implementation.graph.tasks['task 1'].execution_options.caching_strategy.max_cache_staleness, 'P30D') - def test_handle_parsing_task_container_spec_options(self): - component_text = '''\ -implementation: - graph: - tasks: - task 1: - componentRef: {name: Comp 1} - executionOptions: - launcherOptions: - kubernetes: - metadata: - labels: - test_label: test_value - mainContainer: - resources: - requests: - memory: 1024Mi - cpu: 200m - volumeMounts: - - name: workdir - mountPath: /mnt/vol - podSpec: - volumes: - - name: workdir - emptyDir: {} - -''' - expected_kubernetes_options = { - 'metadata': { - 'labels': { - 'test_label': 'test_value', - }, - }, - 'mainContainer': { - 'resources': { - 'requests': { - 'memory': '1024Mi', - 'cpu': '200m', - } - }, - 'volumeMounts': [ - { - 'name': 'workdir', - 'mountPath': '/mnt/vol', - } - ], - }, - 'podSpec': { - 'volumes': [ - { - 'name': 'workdir', - 'emptyDir': {}, - }, - ], - }, - } - struct = load_yaml(component_text) - component_spec = ComponentSpec.from_dict(struct) - self.assertEqual( - component_spec.implementation.graph.tasks['task 1']. - execution_options.launcher_options['kubernetes'], - expected_kubernetes_options - ) - def test_load_graph_component(self): component_text = '''\ inputs: