Skip to content

Commit

Permalink
Merge pull request #434 from vprashar2929/bump-model-s
Browse files Browse the repository at this point in the history
feat: bump up model-server version to 0.7.12
  • Loading branch information
sthaha authored Oct 28, 2024
2 parents 763ad69 + aaa6e74 commit a884f56
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/components/estimator/estimator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

const (
// NOTE: update tests/images.yaml when changing this image
StableImage = "quay.io/sustainable_computing_io/kepler_model_server:v0.7.11-2"
StableImage = "quay.io/sustainable_computing_io/kepler_model_server:v0.7.12"
waitForSocketCommand = "until [ -e /tmp/estimator.sock ]; do sleep 1; done && %s"
)

Expand Down
11 changes: 6 additions & 5 deletions pkg/components/modelserver/modelserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const (

const (
defaultModelServer = "http://%s.%s.svc.cluster.local:%d"
StableImage = "quay.io/sustainable_computing_io/kepler_model_server:v0.7.11-2"
StableImage = "quay.io/sustainable_computing_io/kepler_model_server:v0.7.12"
waitForModelServerCommand = "until [[ \"$(curl -s -o /dev/null -w %%{http_code} %s/best-models)\" -eq 200 ]]; do sleep 1; done"
)

Expand Down Expand Up @@ -71,7 +71,7 @@ func NewDeployment(deployName string, ms *v1alpha1.InternalModelServerSpec, name
volumes := []corev1.Volume{
storage,
k8s.VolumeFromConfigMap("cfm", configMapName),
k8s.VolumeFromEmptyDir("resource"),
k8s.VolumeFromEmptyDir("data"),
}

mounts := []corev1.VolumeMount{{
Expand All @@ -82,8 +82,8 @@ func NewDeployment(deployName string, ms *v1alpha1.InternalModelServerSpec, name
Name: "mnt",
MountPath: "/mnt",
}, {
Name: "resource",
MountPath: "/usr/local/lib/python3.10/site-packages/resource",
Name: "data",
MountPath: "/data",
}}

port := ms.Port
Expand Down Expand Up @@ -179,7 +179,8 @@ func NewConfigMap(deployName string, d components.Detail, ms *v1alpha1.InternalM
}
}
msConfig := k8s.StringMap{
"MODEL_PATH": defaultIfEmpty(ms.Path, "/mnt/models"),
"MODEL_PATH": defaultIfEmpty(ms.Path, "/mnt/models"),
"RESOURCE_DIR": "/data/resource",
}
msConfig = msConfig.AddIfNotEmpty("MODEL_SERVER_REQ_PATH", ms.RequestPath)
msConfig = msConfig.AddIfNotEmpty("MODEL_SERVER_MODEL_LIST_PATH", ms.ListPath)
Expand Down
4 changes: 3 additions & 1 deletion pkg/components/modelserver/modelserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func TestConfigMap(t *testing.T) {
{
spec: &v1alpha1.InternalModelServerSpec{},
data: map[string]string{
"MODEL_PATH": "/mnt/models",
"MODEL_PATH": "/mnt/models",
"RESOURCE_DIR": "/data/resource",
},
scenario: "default case",
},
Expand All @@ -54,6 +55,7 @@ func TestConfigMap(t *testing.T) {
"MODEL_SERVER_MODEL_LIST_PATH": "fake-model-list-path",
"INITIAL_PIPELINE_URL": "fake-pipeline",
"ERROR_KEY": "fake-error-key",
"RESOURCE_DIR": "/data/resource",
},
scenario: "user defined server-api config",
},
Expand Down
2 changes: 1 addition & 1 deletion tests/images.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
images:
- component: 'model-server'
image: 'quay.io/sustainable_computing_io/kepler_model_server:v0.7.11-2'
image: 'quay.io/sustainable_computing_io/kepler_model_server:v0.7.12'

0 comments on commit a884f56

Please sign in to comment.