Skip to content

Commit

Permalink
Add correct tag value for models in dev mode (#1230)
Browse files Browse the repository at this point in the history
## Changes
Fixes #922

## Tests
Added regression test case
  • Loading branch information
andrewnester authored Feb 22, 2024
1 parent b65ce75 commit 1588a14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bundle/config/mutator/process_target_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions bundle/config/mutator/process_target_mode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1588a14

Please sign in to comment.