Skip to content

Commit

Permalink
Removed the launcherOptions for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark-kun committed Jul 17, 2020
1 parent c0d654c commit 0940817
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@
"type": "object",
"properties": {
"retryStrategy": {"$ref": "#/definitions/RetryStrategySpec"},
"cachingStrategy": {"$ref": "#/definitions/CachingStrategySpec"},
"launcherOptions": {"type": "object"}
"cachingStrategy": {"$ref": "#/definitions/CachingStrategySpec"}
},
"additionalProperties": false
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@
maxRetries: integer
cachingStrategy: #CachingStrategySpec
maxCacheStaleness: string
launcherOptions: #Map str -> Any
1 change: 0 additions & 1 deletion sdk/python/kfp/components/structures/components.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, google.protobuf.Struct> launcherOptions = 2;
}
64 changes: 0 additions & 64 deletions sdk/python/kfp/components_tests/test_graph_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0940817

Please sign in to comment.