|
1 |
| ---- a/python_dsl_template.jinja2 2024-04-18 17:54:08.373533064 -0400 |
2 |
| -+++ b/python_dsl_template.jinja2 2024-04-18 18:01:30.152253439 -0400 |
3 |
| -@@ -97,9 +97,6 @@ |
| 1 | +--- a/python_dsl_template.jinja2 2024-05-22 11:58:26.259019305 -0400 |
| 2 | ++++ b/python_dsl_template.jinja2 2024-05-22 12:00:31.507205520 -0400 |
| 3 | +@@ -18,7 +18,6 @@ |
| 4 | + from kfp.kubernetes import common |
| 5 | + from kfp.kubernetes import kubernetes_executor_config_pb2 as pb |
| 6 | + |
| 7 | +-from kfp.kubernetes import add_toleration, add_pod_label, add_pod_annotation |
| 8 | + |
| 9 | + {# Load statements for custom components -#} |
| 10 | + {# component_hash = """<TEXT>""" -#} |
| 11 | +@@ -64,9 +63,6 @@ |
4 | 12 | secret.use_secret_as_env({{ task_name }}, "{{ workflow_task.task_modifiers.object_storage_secret }}", { "AWS_ACCESS_KEY_ID": "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY": "AWS_SECRET_ACCESS_KEY" })
|
5 | 13 | {% endif %}
|
6 | 14 | {{ task_name }}.set_display_name("{{ workflow_task.name | string_delimiter_safe }}")
|
|
10 | 18 | {% if workflow_task.task_modifiers.cpu_request %}
|
11 | 19 | {{ task_name }}.set_cpu_request(cpu="{{ workflow_task.task_modifiers.cpu_request }}")
|
12 | 20 | {% endif %}
|
13 |
| -@@ -126,16 +123,6 @@ |
| 21 | +@@ -93,16 +89,6 @@ |
14 | 22 | {% if workflow_task.task_modifiers.disable_node_caching %}
|
15 | 23 | {{ task_name }}.execution_options.caching_strategy.max_cache_staleness = "P0D"
|
16 | 24 | {% endif %}
|
|
27 | 35 | {% if workflow_task.task_modifiers.kubernetes_secrets %}
|
28 | 36 | {% for env_var, secret_dict in workflow_task.task_modifiers.kubernetes_secrets.items() %}
|
29 | 37 | secret.use_secret_as_env({{ task_name }}, "{{ secret_dict.name }}", { "{{ secret_dict.key }}" : "{{ env_var }}" })
|
| 38 | +@@ -113,29 +99,6 @@ |
| 39 | + volume.mount_pvc({{ task_name }}, "{{ volume_dict.pvc_name }}", "{{ volume_path }}") |
| 40 | + {% endfor %} |
| 41 | + {% endif %} |
| 42 | +-{% if workflow_task.task_modifiers.kubernetes_tolerations %} |
| 43 | +-{% for toleration_dict in workflow_task.task_modifiers.kubernetes_tolerations.values() %} |
| 44 | +- add_toleration( |
| 45 | +- {{ task_name }}, |
| 46 | +- {% if toleration_dict.key %} |
| 47 | +- key="{{ toleration_dict.key }}", |
| 48 | +- {% else %} |
| 49 | +- key=None, |
| 50 | +- {% endif %} |
| 51 | +- operator="{{ toleration_dict.operator }}", |
| 52 | +- {% if toleration_dict.value %} |
| 53 | +- value="{{ toleration_dict.value | string_delimiter_safe }}", |
| 54 | +- {% else %} |
| 55 | +- value=None, |
| 56 | +- {% endif %} |
| 57 | +- {% if toleration_dict.effect %} |
| 58 | +- effect="{{ toleration_dict.effect }}", |
| 59 | +- {% else %} |
| 60 | +- effect=None, |
| 61 | +- {% endif %} |
| 62 | +- ) |
| 63 | +-{% endfor %} |
| 64 | +-{% endif %} |
| 65 | + {# declare upstream dependencies -#} |
| 66 | + {% if workflow_task.upstream_workflow_task_ids %} |
| 67 | + {% for upstream_workflow_task_id in workflow_task.upstream_workflow_task_ids %} |
0 commit comments