Skip to content

Commit a3ff979

Browse files
sutaakaropenshift-merge-bot[bot]
authored andcommitted
Fix raytune_oai_mr_grpc_test test
1 parent 5d41c7a commit a3ff979

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toolchain go1.21.5
77
require (
88
github.com/kubeflow/training-operator v1.7.0
99
github.com/onsi/gomega v1.31.1
10-
github.com/project-codeflare/codeflare-common v0.0.0-20241121090634-e99e941c6921
10+
github.com/project-codeflare/codeflare-common v0.0.0-20241203135025-af256802fc2d
1111
github.com/prometheus/client_golang v1.20.4
1212
github.com/prometheus/common v0.57.0
1313
github.com/ray-project/kuberay/ray-operator v1.1.0-alpha.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
365365
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
366366
github.com/project-codeflare/appwrapper v0.8.0 h1:vWHNtXUtHutN2EzYb6rryLdESnb8iDXsCokXOuNYXvg=
367367
github.com/project-codeflare/appwrapper v0.8.0/go.mod h1:FMQ2lI3fz6LakUVXgN1FTdpsc3BBkNIZZgtMmM9J5UM=
368-
github.com/project-codeflare/codeflare-common v0.0.0-20241121090634-e99e941c6921 h1:OI9jKDW4yxbXDTpf4Y+8H4uVfdCH+jIqN0JTQfdUMYw=
369-
github.com/project-codeflare/codeflare-common v0.0.0-20241121090634-e99e941c6921/go.mod h1:v7XKwaDoCspsHQlWJNarO7gOpR+iumSS+c1bWs3kJOI=
368+
github.com/project-codeflare/codeflare-common v0.0.0-20241203135025-af256802fc2d h1:WN/cN/giLiicdGjnztRYgfR7K7biaGmPO98WdWMppos=
369+
github.com/project-codeflare/codeflare-common v0.0.0-20241203135025-af256802fc2d/go.mod h1:v7XKwaDoCspsHQlWJNarO7gOpR+iumSS+c1bWs3kJOI=
370370
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
371371
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
372372
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=

tests/odh/notebook.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ import (
2929
"k8s.io/apimachinery/pkg/util/yaml"
3030
)
3131

32+
const (
33+
NOTEBOOK_POD_NAME = "jupyter-nb-kube-3aadmin-0"
34+
NOTEBOOK_CONTAINER_NAME = "jupyter-nb-kube-3aadmin"
35+
)
36+
3237
var notebookResource = schema.GroupVersionResource{Group: "kubeflow.org", Version: "v1", Resource: "notebooks"}
3338

3439
type NotebookProps struct {
@@ -48,6 +53,7 @@ type NotebookProps struct {
4853
S3BucketName string
4954
S3AccessKeyId string
5055
S3SecretAccessKey string
56+
S3Endpoint string
5157
S3DefaultRegion string
5258
}
5359

@@ -57,12 +63,14 @@ func createNotebook(test Test, namespace *corev1.Namespace, notebookUserToken, r
5763
s3BucketName, s3BucketNameExists := GetStorageBucketName()
5864
s3AccessKeyId, _ := GetStorageBucketAccessKeyId()
5965
s3SecretAccessKey, _ := GetStorageBucketSecretKey()
66+
s3Endpoint, _ := GetStorageBucketDefaultEndpoint()
6067
s3DefaultRegion, _ := GetStorageBucketDefaultRegion()
6168

6269
if !s3BucketNameExists {
6370
s3BucketName = "''"
6471
s3AccessKeyId = "''"
6572
s3SecretAccessKey = "''"
73+
s3Endpoint = "''"
6674
s3DefaultRegion = "''"
6775
}
6876

@@ -82,6 +90,7 @@ func createNotebook(test Test, namespace *corev1.Namespace, notebookUserToken, r
8290
S3BucketName: s3BucketName,
8391
S3AccessKeyId: s3AccessKeyId,
8492
S3SecretAccessKey: s3SecretAccessKey,
93+
S3Endpoint: s3Endpoint,
8594
S3DefaultRegion: s3DefaultRegion,
8695
PipIndexUrl: GetPipIndexURL(),
8796
PipTrustedHost: GetPipTrustedHost(),

tests/odh/raytune_oai_mr_grpc_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ import (
2323
"path/filepath"
2424
"strings"
2525
"testing"
26+
"time"
27+
28+
corev1 "k8s.io/api/core/v1"
2629

2730
. "github.com/onsi/gomega"
2831
. "github.com/project-codeflare/codeflare-common/support"
@@ -88,7 +91,6 @@ func raytuneHpo(t *testing.T, numGpus int) {
8891

8992
// list changes required in llm-deepspeed-finetune-demo.ipynb file and update those
9093
requiredChangesInNotebook := map[string]string{
91-
"skip_tls=True": "skip_tls=False",
9294
"token = 'TOKEN'": fmt.Sprintf("token='%s'", userToken),
9395
"server = 'SERVER'": fmt.Sprintf("server='%s'", GetOpenShiftApiUrl(test)),
9496
"name='terrestial-raytest'": fmt.Sprintf("name='%s',\\n\",\n\t\t\" namespace='%s'", "terrestial-raytest", namespace.Name),
@@ -132,7 +134,7 @@ func raytuneHpo(t *testing.T, numGpus int) {
132134
)
133135

134136
// Make sure the RayCluster finishes and is deleted
135-
test.Eventually(RayClusters(test, namespace.Name), TestTimeoutLong).
136-
Should(BeEmpty())
137+
test.Eventually(PodLog(test, namespace.Name, NOTEBOOK_POD_NAME, corev1.PodLogOptions{Container: NOTEBOOK_CONTAINER_NAME}), 20*time.Minute).
138+
Should(ContainSubstring("Model Prediction:"))
137139

138140
}

tests/odh/resources/custom-nb-small.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ spec:
5454
value: {{.S3AccessKeyId}}
5555
- name: AWS_SECRET_ACCESS_KEY
5656
value: {{.S3SecretAccessKey}}
57+
- name: AWS_S3_ENDPOINT
58+
value: {{.S3Endpoint}}
5759
- name: AWS_DEFAULT_REGION
5860
value: {{.S3DefaultRegion}}
5961
- name: AWS_S3_BUCKET

0 commit comments

Comments
 (0)