File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
tools/pytorchjob-generator/chart Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ annotations:
2929
3030
3131{ {- define " mlbatch.schedulingSpec" } }
32- { {- if .Values.terminationGracePeriodSeconds } }
32+ { {- if ne .Values.terminationGracePeriodSeconds nil } }
3333terminationGracePeriodSeconds: { { .Values.terminationGracePeriodSeconds } }
3434{ {- end } }
3535{ {- if .Values.bypassCoscheduler } }
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ metadata:
6767 {{- if .Values.retryPausePeriodDuration }}
6868 workload.codeflare.dev.appwrapper/retryPausePeriodDuration : " {{ .Values.retryPausePeriodDuration }}"
6969 {{- end }}
70- {{- if .Values.retryLimit }}
70+ {{- if ne .Values.retryLimit nil }}
7171 workload.codeflare.dev.appwrapper/retryLimit : " {{ .Values.retryLimit }}"
7272 {{- end }}
7373 {{- if .Values.forcefulDeletionGracePeriodDuration }}
Original file line number Diff line number Diff line change @@ -164,6 +164,22 @@ tests:
164164 workload.codeflare.dev.appwrapper/forcefulDeletionGracePeriodDuration : " 19s"
165165 workload.codeflare.dev.appwrapper/deletionOnFailureGracePeriodDuration : " 2s"
166166
167+ - it : Setting integer fault tolerance annotation to 0
168+ set :
169+ retryLimit : 0
170+ terminationGracePeriodSeconds : 0
171+ asserts :
172+ - isSubset :
173+ path : metadata.annotations
174+ content :
175+ workload.codeflare.dev.appwrapper/retryLimit : " 0"
176+ - equal :
177+ path : spec.components[0].template.spec.pytorchReplicaSpecs.Master.template.spec.terminationGracePeriodSeconds
178+ value : 0
179+ - equal :
180+ path : spec.components[0].template.spec.pytorchReplicaSpecs.Worker.template.spec.terminationGracePeriodSeconds
181+ value : 0
182+
167183- it : Setting just one tolerance annotation
168184 set :
169185 deletionOnFailureGracePeriodDuration : " 6h"
You can’t perform that action at this time.
0 commit comments