Skip to content

Commit

Permalink
fix e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: jerryzhuang <[email protected]>
  • Loading branch information
zhuangqh committed Nov 3, 2024
1 parent 2925666 commit ceb4871
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/inference/preset-inferences.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
)

const (
ProbePath = "/healthz"
ProbePath = "/health"
Port5000 = int32(5000)
InferenceFile = "inference_api.py"
InferenceFile = "/workspace/tfs/inference_api.py"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions pkg/inference/preset-inferences_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestCreatePresetInference(t *testing.T) {
workload: "Deployment",
// No BaseCommand, TorchRunParams, TorchRunRdzvParams, or ModelRunParams
// So expected cmd consists of shell command and inference file
expectedCmd: "/bin/sh -c inference_api.py",
expectedCmd: "/bin/sh -c python3 /workspace/tfs/inference_api.py",
hasAdapters: false,
},

Expand All @@ -58,7 +58,7 @@ func TestCreatePresetInference(t *testing.T) {
c.On("Create", mock.IsType(context.TODO()), mock.IsType(&appsv1.StatefulSet{}), mock.Anything).Return(nil)
},
workload: "StatefulSet",
expectedCmd: "/bin/sh -c inference_api.py",
expectedCmd: "/bin/sh -c python3 /workspace/tfs/inference_api.py",
hasAdapters: false,
},

Expand All @@ -69,7 +69,7 @@ func TestCreatePresetInference(t *testing.T) {
c.On("Create", mock.IsType(context.TODO()), mock.IsType(&appsv1.Deployment{}), mock.Anything).Return(nil)
},
workload: "Deployment",
expectedCmd: "/bin/sh -c inference_api.py",
expectedCmd: "/bin/sh -c python3 /workspace/tfs/inference_api.py",
hasAdapters: true,
expectedVolume: "adapter-volume",
},
Expand Down
2 changes: 2 additions & 0 deletions pkg/utils/test/testModel.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func (*testModel) GetInferenceParameters() *model.PresetParam {
return &model.PresetParam{
GPUCountRequirement: "1",
ReadinessTimeout: time.Duration(30) * time.Minute,
BaseCommand: "python3",
}
}
func (*testModel) GetTuningParameters() *model.PresetParam {
Expand All @@ -37,6 +38,7 @@ func (*testDistributedModel) GetInferenceParameters() *model.PresetParam {
return &model.PresetParam{
GPUCountRequirement: "1",
ReadinessTimeout: time.Duration(30) * time.Minute,
BaseCommand: "python3",
}
}
func (*testDistributedModel) GetTuningParameters() *model.PresetParam {
Expand Down

0 comments on commit ceb4871

Please sign in to comment.