Skip to content

Commit 82fa92f

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 8f8e52e + 8ad8367 commit 82fa92f

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

tests/kfto/core/kfto_kueue_sft_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func TestPytorchjobUsingKueueQuota(t *testing.T) {
141141
NamespaceSelector: &metav1.LabelSelector{},
142142
ResourceGroups: []kueuev1beta1.ResourceGroup{
143143
{
144-
CoveredResources: []corev1.ResourceName{corev1.ResourceName("cpu"), corev1.ResourceName("memory")},
144+
CoveredResources: []corev1.ResourceName{corev1.ResourceName("cpu"), corev1.ResourceName("memory"), corev1.ResourceName("nvidia.com/gpu")},
145145
Flavors: []kueuev1beta1.FlavorQuotas{
146146
{
147147
Name: kueuev1beta1.ResourceFlavorReference(resourceFlavor.Name),
@@ -154,6 +154,10 @@ func TestPytorchjobUsingKueueQuota(t *testing.T) {
154154
Name: corev1.ResourceMemory,
155155
NominalQuota: resource.MustParse("8Gi"),
156156
},
157+
{
158+
Name: corev1.ResourceName("nvidia.com/gpu"),
159+
NominalQuota: resource.MustParse("0"),
160+
},
157161
},
158162
},
159163
},

tests/kfto/core/kfto_training_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func runKFTOPyTorchJob(t *testing.T, image string, gpuLabel string, numGpus int)
4646

4747
// Create a ConfigMap with training script
4848
configData := map[string][]byte{
49-
"hf_llm_training.py": ReadFileExt(test, "hf_llm_training.py"),
49+
"hf_llm_training.py": ReadFile(test, "hf_llm_training.py"),
5050
}
5151
config := CreateConfigMap(test, namespace, configData)
5252

tests/kfto/core/support.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ package core
1919
import (
2020
"embed"
2121
"fmt"
22-
"os"
2322
"time"
2423

25-
"github.com/onsi/gomega"
2624
. "github.com/onsi/gomega"
2725
. "github.com/project-codeflare/codeflare-common/support"
2826

@@ -34,6 +32,7 @@ import (
3432
)
3533

3634
//go:embed *.json
35+
//go:embed *.py
3736
var files embed.FS
3837

3938
func ReadFile(t Test, fileName string) []byte {
@@ -43,13 +42,6 @@ func ReadFile(t Test, fileName string) []byte {
4342
return file
4443
}
4544

46-
func ReadFileExt(t Test, fileName string) []byte {
47-
t.T().Helper()
48-
file, err := os.ReadFile(fileName)
49-
t.Expect(err).NotTo(gomega.HaveOccurred())
50-
return file
51-
}
52-
5345
func PyTorchJob(t Test, namespace, name string) func(g Gomega) *kftov1.PyTorchJob {
5446
return func(g Gomega) *kftov1.PyTorchJob {
5547
job, err := t.Client().Kubeflow().KubeflowV1().PyTorchJobs(namespace).Get(t.Ctx(), name, metav1.GetOptions{})

0 commit comments

Comments
 (0)