Skip to content

Commit 10922eb

Browse files
authored
Merge pull request #535 from harshad16/fix-patch-tf
Patch elyra kfp template with latest change for TensorFlow
2 parents 6ac55af + 979d71d commit 10922eb

File tree

1 file changed

+42
-4
lines changed

1 file changed

+42
-4
lines changed

jupyter/tensorflow/ubi9-python-3.9/utils/python_dsl_template.patch

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
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 @@
412
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" })
513
{% endif %}
614
{{ task_name }}.set_display_name("{{ workflow_task.name | string_delimiter_safe }}")
@@ -10,7 +18,7 @@
1018
{% if workflow_task.task_modifiers.cpu_request %}
1119
{{ task_name }}.set_cpu_request(cpu="{{ workflow_task.task_modifiers.cpu_request }}")
1220
{% endif %}
13-
@@ -126,16 +123,6 @@
21+
@@ -93,16 +89,6 @@
1422
{% if workflow_task.task_modifiers.disable_node_caching %}
1523
{{ task_name }}.execution_options.caching_strategy.max_cache_staleness = "P0D"
1624
{% endif %}
@@ -27,3 +35,33 @@
2735
{% if workflow_task.task_modifiers.kubernetes_secrets %}
2836
{% for env_var, secret_dict in workflow_task.task_modifiers.kubernetes_secrets.items() %}
2937
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

Comments
 (0)