mirror of https://github.com/databricks/cli.git
Add correct tag value for models in dev mode (#1230)
## Changes Fixes #922 ## Tests Added regression test case
This commit is contained in:
parent
b65ce75c1f
commit
1588a14d07
|
@ -70,7 +70,7 @@ func transformDevelopmentMode(b *bundle.Bundle) error {
|
||||||
|
|
||||||
for i := range r.Models {
|
for i := range r.Models {
|
||||||
r.Models[i].Name = prefix + r.Models[i].Name
|
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 {
|
for i := range r.Experiments {
|
||||||
|
|
|
@ -138,6 +138,7 @@ func TestProcessTargetModeDevelopment(t *testing.T) {
|
||||||
|
|
||||||
// Model 1
|
// Model 1
|
||||||
assert.Equal(t, "[dev lennart] model1", b.Config.Resources.Models["model1"].Name)
|
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
|
// Model serving endpoint 1
|
||||||
assert.Equal(t, "dev_lennart_servingendpoint1", b.Config.Resources.ModelServingEndpoints["servingendpoint1"].Name)
|
assert.Equal(t, "dev_lennart_servingendpoint1", b.Config.Resources.ModelServingEndpoints["servingendpoint1"].Name)
|
||||||
|
|
Loading…
Reference in New Issue