|
63 | 63 | get_cpu_affinity, |
64 | 64 | get_gpu_scheduler, |
65 | 65 | create_sub_slicing_annotations, |
| 66 | + create_placement_policy_label, |
| 67 | + is_placement_policy_supported, |
66 | 68 | ) |
67 | 69 | from ..core.storage import ( |
68 | 70 | GCE_PD_TYPE, |
|
143 | 145 | nodeSelector: |
144 | 146 | {accelerator_label} |
145 | 147 | {machine_label} |
| 148 | + {placement_policy_label} |
146 | 149 | {autoprovisioning_args} |
147 | 150 | priorityClassName: {args.priority} |
148 | 151 | hostNetwork: true |
|
272 | 275 | terminationGracePeriodSeconds: {args.termination_grace_period_seconds} |
273 | 276 | priorityClassName: {args.priority} |
274 | 277 | nodeSelector: |
| 278 | + {placement_policy_label} |
275 | 279 | {autoprovisioning_args} |
276 | 280 | pathwaysDir: {args.pathways_gcs_location} #This bucket needs to be created in advance. |
277 | 281 | controller: |
@@ -558,6 +562,11 @@ def workload_create(args) -> None: |
558 | 562 | user_workload=get_user_workload_for_pathways(args, system), |
559 | 563 | local_queue_name=LOCAL_QUEUE_NAME, |
560 | 564 | autoprovisioning_args=autoprovisioning_args, |
| 565 | + placement_policy_label=( |
| 566 | + create_placement_policy_label(system) |
| 567 | + if is_placement_policy_supported(system) |
| 568 | + else '' |
| 569 | + ), |
561 | 570 | ) |
562 | 571 | else: |
563 | 572 | container, debugging_dashboard_id = get_user_workload_container( |
@@ -585,6 +594,11 @@ def workload_create(args) -> None: |
585 | 594 | create_sub_slicing_annotations(args.sub_slicing_topology) |
586 | 595 | ) |
587 | 596 | ), |
| 597 | + placement_policy_label=( |
| 598 | + create_placement_policy_label(system) |
| 599 | + if is_placement_policy_supported(system) |
| 600 | + else '' |
| 601 | + ), |
588 | 602 | machine_label=create_machine_label(system.accelerator_type, system), |
589 | 603 | local_queue_name=LOCAL_QUEUE_NAME, |
590 | 604 | autoprovisioning_args=autoprovisioning_args, |
|
0 commit comments