Skip to content

Commit

Permalink
Add missing nodepool label (#389)
Browse files Browse the repository at this point in the history
PR that adds missing nodepool label from the compiler. The label was
defaulted to `node_pool` which currently only applies to GCP.
  • Loading branch information
PhilippeMoussalli authored Aug 28, 2023
1 parent 0399b8b commit 15c7952
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/fondant/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,13 @@ def kfp_pipeline():
def _set_configuration(self, task, fondant_component_operation):
# Unpack optional specifications
number_of_gpus = fondant_component_operation.number_of_gpus
node_pool_label = fondant_component_operation.node_pool_label
node_pool_name = fondant_component_operation.node_pool_name

# Assign optional specification
if number_of_gpus is not None:
task.set_gpu_limit(number_of_gpus)
if node_pool_name is not None:
task.add_node_selector_constraint("node_pool", node_pool_name)
if node_pool_name is not None and node_pool_label is not None:
task.add_node_selector_constraint(node_pool_label, node_pool_name)

return task
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ spec:
pipelines.kubeflow.org/pipeline-sdk-type: kfp
name: first-component
nodeSelector:
node_pool: a_node_pool
a_node_pool_label: a_node_pool
outputs:
artifacts:
- name: first-component-output_manifest_path
Expand Down

0 comments on commit 15c7952

Please sign in to comment.