Canary of a model's newer weights: ctl model canary, promote and canaries, rolled back by itself when it serves worse
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0a4076928a
commit
a1dfd4df1d
13 files changed
+750
-18
No files matched your search
@@ -306,6 +306,23 @@ func (s *Service) SetSource(ctx context.Context, name, source string, origin *ca
|
||||
return final, err
|
||||
}
|
||||
|
||||
// SetCanary gives a model added at runtime a canary, changes its share, or
|
||||
// with nil takes it away. The candidate must already be in the catalog.
|
||||
func (s *Service) SetCanary(ctx context.Context, name string, c *catalog.Canary, by string) (catalog.Model, error) {
|
||||
final, err := s.update(ctx, name, by, "set its canary", func(m *catalog.Model) error {
|
||||
m.Canary = c
|
||||
return nil
|
||||
})
|
||||
if err == nil {
|
||||
if c == nil {
|
||||
s.log.Info("model canary removed", "model", name, "by", by)
|
||||
} else {
|
||||
s.log.Info("model canary set", "model", name, "canary", c.Model, "percent", c.Percent, "by", by)
|
||||
}
|
||||
}
|
||||
return final, err
|
||||
}
|
||||
|
||||
// SetOrigin records where a model's weights came from without changing them:
|
||||
// for a model added before origins were kept. A model from configuration is
|
||||
// left alone, its origin worked out again when it is needed.
|
||||
|
||||
Reference in new issue
Block a user