Skip to content

Commit

Permalink
Add printing.
Browse files Browse the repository at this point in the history
Signed-off-by: Revital Sur <[email protected]>
  • Loading branch information
revit13 committed Sep 29, 2024
1 parent 83f40b6 commit 1972fe3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def _add_tolerations() -> None:
try:
tolerations = os.getenv("KFP_TOLERATIONS", "")
if tolerations != "":
print(f"Note: Applying Tolerations {tolerations} to kubeflow pipelines pods")
tolerations = json.loads(tolerations)
for toleration in tolerations:
component.add_toleration(
Expand All @@ -80,6 +81,7 @@ def _add_node_selector() -> None:
try:
node_selector = os.getenv("KFP_NODE_SELECTOR", "")
if node_selector != "":
print(f"Note: Applying node_selector {node_selector} to kubeflow pipelines pods")
node_selector = json.loads(node_selector)
component.add_node_selector_constraint(node_selector["label_key"], node_selector["label_value"])
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def _add_tolerations() -> None:
try:
tolerations = os.getenv("KFP_TOLERATIONS", "")
if tolerations != "":
print(f"Note: Applying Tolerations {tolerations} to kubeflow pipelines pods")
tolerations = json.loads(tolerations)
for toleration in tolerations:
kubernetes.add_toleration(
Expand All @@ -58,6 +59,7 @@ def _add_node_selector() -> None:
try:
node_selector = os.getenv("KFP_NODE_SELECTOR", "")
if node_selector != "":
print(f"Note: Applying node_selector {node_selector} to kubeflow pipelines pods")
node_selector = json.loads(node_selector)
kubernetes.add_node_selector(
task,
Expand Down

0 comments on commit 1972fe3

Please sign in to comment.