Skip to content

Commit 2f8eeee

Browse files
committed
fix: merge conflict
1 parent 228ab82 commit 2f8eeee

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ require (
1111
github.com/aws/smithy-go v1.22.3
1212
github.com/gin-contrib/gzip v1.2.3
1313
github.com/gin-gonic/gin v1.10.1
14+
github.com/influxdata/line-protocol/v2 v2.2.1
1415
github.com/lithammer/shortuuid/v4 v4.2.0
1516
github.com/onsi/ginkgo/v2 v2.23.4
1617
github.com/onsi/gomega v1.37.0

internal/controller/tensorfusionworkload_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ func (r *TensorFusionWorkloadReconciler) tryStartWorker(
269269
workload *tfv1.TensorFusionWorkload,
270270
hash string,
271271
) (*corev1.Pod, error) {
272-
port, err := r.PortAllocator.AssignHostPort(gpu.Status.NodeSelector[constants.KubernetesHostNameLabel])
272+
port, err := r.PortAllocator.AssignHostPort(gpus[0].Status.NodeSelector[constants.KubernetesHostNameLabel])
273273
if err != nil {
274274
return nil, fmt.Errorf("get host port %w", err)
275275
}
276-
pod, hash, err := workerGenerator.GenerateWorkerPod(gpu, fmt.Sprintf("%s-tf-worker-", workload.Name), workload.Namespace, port, workload.Spec.Resources.Requests, workload.Spec.Resources.Limits, hash)
276+
pod, hash, err := workerGenerator.GenerateWorkerPod(gpus, fmt.Sprintf("%s-tf-worker-", workload.Name), workload.Namespace, port, workload.Spec.Resources.Requests, workload.Spec.Resources.Limits, hash)
277277
if err != nil {
278278
return nil, fmt.Errorf("generate worker pod %w", err)
279279
}

internal/controller/tensorfusionworkload_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ var _ = Describe("TensorFusionWorkload Controller", func() {
100100

101101
gpuNames := strings.Split(podList.Items[0].Annotations[constants.GpuKey], ",")
102102
g.Expect(gpuNames).Should(HaveLen(2))
103-
}, timeout, interval).Should(Succeed())
103+
}).Should(Succeed())
104104

105105
checkWorkloadStatus(workload)
106106
})

internal/metrics/recorder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func SetWorkerMetricsByWorkload(pod *corev1.Pod, workload *tfv1.TensorFusionWork
7575
// handle invalid data if exists
7676
metricsItem.GPUCount = 1
7777
} else {
78-
metricsItem.GPUCount = workload.Spec.GPUCount
78+
metricsItem.GPUCount = int(workload.Spec.GPUCount)
7979
}
8080
metricsItem.WorkloadName = workload.Name
8181

0 commit comments

Comments
 (0)