@@ -71,7 +71,7 @@ func calculateGpuUsageFromPodType(dynamicclient dynamic.Interface, pod *v1.Pod,
7171 switch podType {
7272 case "train" :
7373 return generateGpuUsageStatus (topology.Range {Min : 80 , Max : 100 }, gpuFraction , totalGpuMemory , false )
74- case "build" , "interactive-preemptible" :
74+ case "build" , "interactive-preemptible" , "interactive" , "distributed" :
7575 return generateGpuUsageStatus (topology.Range {Min : 0 , Max : 0 }, gpuFraction , totalGpuMemory , false )
7676 case "inference" :
7777 return generateGpuUsageStatus (topology.Range {Min : 0 , Max : 0 }, gpuFraction , totalGpuMemory , true )
@@ -104,6 +104,20 @@ func calculateUtilizationFromAnnotation(annotationValue string) (*topology.Range
104104}
105105
106106func getPodType (dynamicClient dynamic.Interface , pod * v1.Pod ) (string , error ) {
107+ if workloadKind , ok := pod .Labels ["workloadKind" ]; ok {
108+ switch workloadKind {
109+ case "TrainingWorkload" :
110+ return "train" , nil
111+ case "DistributedWorkload" :
112+ return "distributed" , nil
113+ case "InferenceWorkload" :
114+ return "inference" , nil
115+ case "InteractiveWorkload" :
116+ return "interactive" , nil
117+ }
118+ }
119+
120+ // Fallback to existing PodGroup lookup
107121 podGroupName := pod .Annotations [constants .AnnotationPodGroupName ]
108122 if podGroupName == "" {
109123 return "" , fmt .Errorf ("pod %s has no constants.PodGroupNameAnnotation annotation" , pod .Name )
0 commit comments