Skip to content

Commit

Permalink
comment e2e test for official/v0.3.2
Browse files Browse the repository at this point in the history
Signed-off-by: Bangqi Zhu <[email protected]>
  • Loading branch information
Bangqi Zhu committed Nov 15, 2024
1 parent 4a764d9 commit fc1c4fc
Show file tree
Hide file tree
Showing 2 changed files with 242 additions and 241 deletions.
194 changes: 97 additions & 97 deletions test/e2e/preset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,151 +662,151 @@ var _ = Describe("Workspace Preset", func() {
Fail("Fail threshold reached")
}
})
/*
It("should create a mistral workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createMistralWorkspaceWithPresetPublicMode(numOfNode)
It("should create a mistral workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createMistralWorkspaceWithPresetPublicMode(numOfNode)
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
time.Sleep(30 * time.Second)
time.Sleep(30 * time.Second)

validateAssociatedService(workspaceObj)
validateAssociatedService(workspaceObj)
validateInferenceResource(workspaceObj, int32(numOfNode), false)
validateInferenceResource(workspaceObj, int32(numOfNode), false)
validateWorkspaceReadiness(workspaceObj)
})
validateWorkspaceReadiness(workspaceObj)
})
It("should create a Phi-2 workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createPhi2WorkspaceWithPresetPublicMode(numOfNode)
It("should create a Phi-2 workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createPhi2WorkspaceWithPresetPublicMode(numOfNode)
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
time.Sleep(30 * time.Second)
time.Sleep(30 * time.Second)
validateAssociatedService(workspaceObj)
validateAssociatedService(workspaceObj)
validateInferenceResource(workspaceObj, int32(numOfNode), false)
validateInferenceResource(workspaceObj, int32(numOfNode), false)
validateWorkspaceReadiness(workspaceObj)
})
validateWorkspaceReadiness(workspaceObj)
})
It("should create a falcon workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createFalconWorkspaceWithPresetPublicMode(numOfNode)
It("should create a falcon workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createFalconWorkspaceWithPresetPublicMode(numOfNode)
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
time.Sleep(30 * time.Second)
time.Sleep(30 * time.Second)
validateAssociatedService(workspaceObj)
validateAssociatedService(workspaceObj)
validateInferenceResource(workspaceObj, int32(numOfNode), false)
validateInferenceResource(workspaceObj, int32(numOfNode), false)
validateWorkspaceReadiness(workspaceObj)
})

It("should create a llama 7b workspace with preset private mode successfully", func() {
numOfNode := 1
modelVersion, ok := modelInfo[PresetLlama2AChat]
if !ok {
Fail(fmt.Sprintf("Model version for %s not found", PresetLlama2AChat))
}
workspaceObj := createLlama7BWorkspaceWithPresetPrivateMode(aiModelsRegistry, aiModelsRegistrySecret, modelVersion, numOfNode)
validateWorkspaceReadiness(workspaceObj)
})
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
It("should create a llama 7b workspace with preset private mode successfully", func() {
numOfNode := 1
modelVersion, ok := modelInfo[PresetLlama2AChat]
if !ok {
Fail(fmt.Sprintf("Model version for %s not found", PresetLlama2AChat))
}
workspaceObj := createLlama7BWorkspaceWithPresetPrivateMode(aiModelsRegistry, aiModelsRegistrySecret, modelVersion, numOfNode)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
time.Sleep(30 * time.Second)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
validateAssociatedService(workspaceObj)
time.Sleep(30 * time.Second)
validateInferenceResource(workspaceObj, int32(numOfNode), false)
validateAssociatedService(workspaceObj)
validateWorkspaceReadiness(workspaceObj)
})
validateInferenceResource(workspaceObj, int32(numOfNode), false)
It("should create a llama 13b workspace with preset private mode successfully", func() {
if !runLlama13B {
Skip("Skipping llama 13b workspace test")
}
numOfNode := 2
modelVersion, ok := modelInfo[PresetLlama2BChat]
if !ok {
Fail(fmt.Sprintf("Model version for %s not found", PresetLlama2AChat))
}
workspaceObj := createLlama13BWorkspaceWithPresetPrivateMode(aiModelsRegistry, aiModelsRegistrySecret, modelVersion, numOfNode)
validateWorkspaceReadiness(workspaceObj)
})
defer cleanupResources(workspaceObj)
It("should create a llama 13b workspace with preset private mode successfully", func() {
if !runLlama13B {
Skip("Skipping llama 13b workspace test")
}
numOfNode := 2
modelVersion, ok := modelInfo[PresetLlama2BChat]
if !ok {
Fail(fmt.Sprintf("Model version for %s not found", PresetLlama2AChat))
}
workspaceObj := createLlama13BWorkspaceWithPresetPrivateMode(aiModelsRegistry, aiModelsRegistrySecret, modelVersion, numOfNode)
time.Sleep(30 * time.Second)
defer cleanupResources(workspaceObj)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
time.Sleep(30 * time.Second)
time.Sleep(30 * time.Second)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
validateAssociatedService(workspaceObj)
time.Sleep(30 * time.Second)
validateInferenceResource(workspaceObj, int32(numOfNode), true)
validateAssociatedService(workspaceObj)
validateWorkspaceReadiness(workspaceObj)
})
validateInferenceResource(workspaceObj, int32(numOfNode), true)
It("should create a custom template workspace successfully", func() {
numOfNode := 1
imageName := "nginx:latest"
workspaceObj := createCustomWorkspaceWithPresetCustomMode(imageName, numOfNode)
validateWorkspaceReadiness(workspaceObj)
})
defer cleanupResources(workspaceObj)
It("should create a custom template workspace successfully", func() {
numOfNode := 1
imageName := "nginx:latest"
workspaceObj := createCustomWorkspaceWithPresetCustomMode(imageName, numOfNode)
time.Sleep(30 * time.Second)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
time.Sleep(30 * time.Second)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
validateInferenceResource(workspaceObj, int32(numOfNode), false)
time.Sleep(30 * time.Second)
validateWorkspaceReadiness(workspaceObj)
})
validateInferenceResource(workspaceObj, int32(numOfNode), false)
It("should create a Phi-3-mini-128k-instruct workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createPhi3WorkspaceWithPresetPublicMode(numOfNode)
validateWorkspaceReadiness(workspaceObj)
})
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
It("should create a Phi-3-mini-128k-instruct workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createPhi3WorkspaceWithPresetPublicMode(numOfNode)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)
time.Sleep(30 * time.Second)
validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)
validateAssociatedService(workspaceObj)
time.Sleep(30 * time.Second)
validateInferenceResource(workspaceObj, int32(numOfNode), false)
validateAssociatedService(workspaceObj)
validateWorkspaceReadiness(workspaceObj)
})
validateInferenceResource(workspaceObj, int32(numOfNode), false)
validateWorkspaceReadiness(workspaceObj)
})
*/
It("should create a workspace for tuning successfully, and update the workspace with another dataset and output image", func() {
numOfNode := 1
err := copySecretToNamespace(e2eACRSecret, namespaceName)
Expand Down
Loading

0 comments on commit fc1c4fc

Please sign in to comment.