The judges' machine was selected by the judge's profile, but any other model could still be placed beside it. A node labelled llmgw.role now takes only profiles whose selector asks for that role. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
51ca09287f
commit
34764f5ef0
4 files changed
+31
-2
No files matched your search
@@ -1099,3 +1099,19 @@ func TestAProfileCanAskForAnEngineVersion(t *testing.T) {
|
||||
t.Errorf("the rejection should say what the node has:\n%s", res.Explain())
|
||||
}
|
||||
}
|
||||
|
||||
func TestANodeGivenARoleTakesOnlyWhatAsksForIt(t *testing.T) {
|
||||
judge := node("judge", "", 0)
|
||||
judge.Labels = map[string]string{RoleLabel: "judge"}
|
||||
s := New(store(judge))
|
||||
// A model that does not ask for the judges' machine is not put there.
|
||||
res := s.Place([]Profile{{Name: "cpu", Engine: "llamacpp"}}, nil)
|
||||
if res.Placement != nil || !strings.Contains(res.Explain(), "kept for llmgw.role=judge") {
|
||||
t.Fatalf("an ordinary model went on the judges' machine:\n%s", res.Explain())
|
||||
}
|
||||
// The judge, which asks for it, is.
|
||||
res = s.Place([]Profile{{Name: "cpu", Engine: "llamacpp", NodeSelector: map[string]string{RoleLabel: "judge"}}}, nil)
|
||||
if res.Placement == nil || res.Placement.Nodes[0].NodeID != "judge" {
|
||||
t.Fatalf("the judge was not placed on its machine:\n%s", res.Explain())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user