revert: "fix: prevents k8s priority scheduler from blocking cpu only training (#2631)"
* Revert "fix: prevents k8s priority scheduler from blocking cpu only training (#2631)"
This reverts commit
* fix: patch access to k8s resource config
@@ -215,7 +215,7 @@ func (p *pod) configureCoscheduler(newPod *k8sV1.Pod, scheduler string) {
}
resources := p.taskSpec.ResourcesConfig
- minAvailable := 0
+ var minAvailable int
if p.taskSpec.Description == gcTask {
if newPod.Spec.PriorityClassName != "" {
@@ -226,9 +226,8 @@ func (p *pod) configureCoscheduler(newPod *k8sV1.Pod, scheduler string) {
)
}
newPod.Spec.PriorityClassName = "determined-system-priority"
- }
-
- if p.slotType == device.GPU {
+ minAvailable = 0
+ } else {
minAvailable = int(math.Ceil(float64(resources.SlotsPerTrial()) / float64(p.slots)))
}
