Skip to content

Commit 7ee735f

Browse files
committed
fix(distribution): normalize tags in WriteLightweightModel
Signed-off-by: Dorin Geman <[email protected]>
1 parent ced7c79 commit 7ee735f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/distribution/distribution/client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,11 @@ func (c *Client) PushModel(ctx context.Context, tag string, progressWriter io.Wr
580580
// The layers must already exist in the store.
581581
func (c *Client) WriteLightweightModel(mdl types.ModelArtifact, tags []string) error {
582582
c.log.Infoln("Writing lightweight model variant")
583-
return c.store.WriteLightweight(mdl, tags)
583+
normalizedTags := make([]string, len(tags))
584+
for i, tag := range tags {
585+
normalizedTags[i] = c.normalizeModelName(tag)
586+
}
587+
return c.store.WriteLightweight(mdl, normalizedTags)
584588
}
585589

586590
func (c *Client) ResetStore() error {

0 commit comments

Comments
 (0)