Add correct tag value for models in dev mode (#1230)

## Changes
Fixes #922

## Tests
Added regression test case
This commit is contained in:
Andrew Nester 2024-02-22 15:52:49 +01:00 committed by GitHub
parent b65ce75c1f
commit 1588a14d07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,7 @@ func transformDevelopmentMode(b *bundle.Bundle) error {
for i := range r.Models {
r.Models[i].Name = prefix + r.Models[i].Name
r.Models[i].Tags = append(r.Models[i].Tags, ml.ModelTag{Key: "dev", Value: ""})
r.Models[i].Tags = append(r.Models[i].Tags, ml.ModelTag{Key: "dev", Value: tagValue})
}
for i := range r.Experiments {

View File

@ -138,6 +138,7 @@ func TestProcessTargetModeDevelopment(t *testing.T) {
// Model 1
assert.Equal(t, "[dev lennart] model1", b.Config.Resources.Models["model1"].Name)
assert.Contains(t, b.Config.Resources.Models["model1"].Tags, ml.ModelTag{Key: "dev", Value: "lennart"})
// Model serving endpoint 1
assert.Equal(t, "dev_lennart_servingendpoint1", b.Config.Resources.ModelServingEndpoints["servingendpoint1"].Name)