Skip to content

Commit

Permalink
Merge pull request #535 from harshad16/fix-patch-tf
Browse files Browse the repository at this point in the history
Patch elyra kfp template with latest change for TensorFlow
  • Loading branch information
harshad16 authored May 22, 2024
2 parents 6ac55af + 979d71d commit 10922eb
Showing 1 changed file with 42 additions and 4 deletions.
46 changes: 42 additions & 4 deletions jupyter/tensorflow/ubi9-python-3.9/utils/python_dsl_template.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
--- a/python_dsl_template.jinja2 2024-04-18 17:54:08.373533064 -0400
+++ b/python_dsl_template.jinja2 2024-04-18 18:01:30.152253439 -0400
@@ -97,9 +97,6 @@
--- a/python_dsl_template.jinja2 2024-05-22 11:58:26.259019305 -0400
+++ b/python_dsl_template.jinja2 2024-05-22 12:00:31.507205520 -0400
@@ -18,7 +18,6 @@
from kfp.kubernetes import common
from kfp.kubernetes import kubernetes_executor_config_pb2 as pb

-from kfp.kubernetes import add_toleration, add_pod_label, add_pod_annotation

{# Load statements for custom components -#}
{# component_hash = """<TEXT>""" -#}
@@ -64,9 +63,6 @@
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" })
{% endif %}
{{ task_name }}.set_display_name("{{ workflow_task.name | string_delimiter_safe }}")
Expand All @@ -10,7 +18,7 @@
{% if workflow_task.task_modifiers.cpu_request %}
{{ task_name }}.set_cpu_request(cpu="{{ workflow_task.task_modifiers.cpu_request }}")
{% endif %}
@@ -126,16 +123,6 @@
@@ -93,16 +89,6 @@
{% if workflow_task.task_modifiers.disable_node_caching %}
{{ task_name }}.execution_options.caching_strategy.max_cache_staleness = "P0D"
{% endif %}
Expand All @@ -27,3 +35,33 @@
{% if workflow_task.task_modifiers.kubernetes_secrets %}
{% for env_var, secret_dict in workflow_task.task_modifiers.kubernetes_secrets.items() %}
secret.use_secret_as_env({{ task_name }}, "{{ secret_dict.name }}", { "{{ secret_dict.key }}" : "{{ env_var }}" })
@@ -113,29 +99,6 @@
volume.mount_pvc({{ task_name }}, "{{ volume_dict.pvc_name }}", "{{ volume_path }}")
{% endfor %}
{% endif %}
-{% if workflow_task.task_modifiers.kubernetes_tolerations %}
-{% for toleration_dict in workflow_task.task_modifiers.kubernetes_tolerations.values() %}
- add_toleration(
- {{ task_name }},
- {% if toleration_dict.key %}
- key="{{ toleration_dict.key }}",
- {% else %}
- key=None,
- {% endif %}
- operator="{{ toleration_dict.operator }}",
- {% if toleration_dict.value %}
- value="{{ toleration_dict.value | string_delimiter_safe }}",
- {% else %}
- value=None,
- {% endif %}
- {% if toleration_dict.effect %}
- effect="{{ toleration_dict.effect }}",
- {% else %}
- effect=None,
- {% endif %}
- )
-{% endfor %}
-{% endif %}
{# declare upstream dependencies -#}
{% if workflow_task.upstream_workflow_task_ids %}
{% for upstream_workflow_task_id in workflow_task.upstream_workflow_task_ids %}

0 comments on commit 10922eb

Please sign in to comment.