Nodes show their engines' versions and GPUs' capability; a profile can ask for an engine version
NodeView carries engine_versions and compute_capabilities; ctl nodes shows llamacpp b10991 and 6000-24g (7.5). A profile's engine_version restricts it to nodes whose engine version starts with it, and explain-placement says which version a node has, or which engines it has when it lacks the one asked for. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e4e15200d6
commit
619dd751ab
9 files changed
+158
-21
No files matched your search
@@ -12,6 +12,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"maps"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"slices"
|
||||
@@ -228,6 +229,12 @@ type NodeView struct {
|
||||
// which is not the same as having none — placement treats it that way too,
|
||||
// or a control plane upgrade would empty a fleet.
|
||||
Engines []string `json:"engines,omitempty"`
|
||||
// EngineVersions are the installed engines with their versions:
|
||||
// llamacpp → b10991. ComputeCapabilities are its GPUs' CUDA compute
|
||||
// capabilities, 7.0 for a V100, so an engine build's support can be read
|
||||
// against them.
|
||||
EngineVersions map[string]string `json:"engine_versions,omitempty"`
|
||||
ComputeCapabilities []string `json:"compute_capabilities,omitempty"`
|
||||
// Provision is where installing each wanted engine stands. An engine is in
|
||||
// Engines only once its installation here is ready.
|
||||
Provision []inventory.EngineInstall `json:"provision,omitempty"`
|
||||
@@ -647,6 +654,15 @@ func (a *API) Nodes() []NodeView {
|
||||
v.Engines = append(v.Engines, name)
|
||||
}
|
||||
slices.Sort(v.Engines)
|
||||
if len(n.EngineVersions) > 0 {
|
||||
v.EngineVersions = maps.Clone(n.EngineVersions)
|
||||
}
|
||||
for _, g := range n.GPUs {
|
||||
if g.ComputeCapability != "" && !slices.Contains(v.ComputeCapabilities, g.ComputeCapability) {
|
||||
v.ComputeCapabilities = append(v.ComputeCapabilities, g.ComputeCapability)
|
||||
}
|
||||
}
|
||||
slices.Sort(v.ComputeCapabilities)
|
||||
v.Provision = n.Provision
|
||||
if ch := a.ctl.EngineChoices(); ch != nil && len(n.GPUs) > 0 {
|
||||
chosen := ch.For(n.ID)
|
||||
|
||||
@@ -89,3 +89,18 @@ func TestAJudgeIsAskedAndItsWordsShown(t *testing.T) {
|
||||
t.Errorf("no text: %d", code)
|
||||
}
|
||||
}
|
||||
|
||||
func TestANodeSaysItsEnginesVersionsAndCapabilities(t *testing.T) {
|
||||
n := gpuNode("volta", 2)
|
||||
n.EngineVersions = map[string]string{"llamacpp": "b10991", "vllm": "0.10.2"}
|
||||
for i := range n.GPUs {
|
||||
n.GPUs[i].ComputeCapability = "7.0"
|
||||
}
|
||||
a, _ := setup(t, testModels(), n)
|
||||
var nodes []NodeView
|
||||
call(t, a, "GET", "/api/v1/nodes", "", &nodes)
|
||||
if len(nodes) != 1 || nodes[0].EngineVersions["vllm"] != "0.10.2" ||
|
||||
len(nodes[0].ComputeCapabilities) != 1 || nodes[0].ComputeCapabilities[0] != "7.0" {
|
||||
t.Errorf("%+v", nodes)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user