7b1df95627
Vendor-agnostic ResourceProbe (commons): NvidiaResourceProbe reads nvidia-smi (injectable runner) for whole-device VRAM/util and /proc/<pid>/status for the managed llama-server RSS, both fail-soft to null; UnavailableProbe for non-GPU hosts / the static path. DefaultModelManager.currentPid() + LlamaProcess.pid expose the managed pid. ServerMessage.ResourceStatus (resource.status, NonEventMessage, all-nullable) pushed every 2.5s on the global stream plus one in the initial snapshot. Live gauge only — never event-sourced (feeds no core decision), so invariants #8/#9 hold. Main wires the NVIDIA probe on the managed path when nvidia-smi is present, else UnavailableProbe. Tests: csv parsing (single/multi/malformed), gpu+rss combine, fallbacks. Plan: docs/plans/2026-05-31-model-lifecycle-management.md (slice 4 of 5).
23 lines
681 B
Groovy
23 lines
681 B
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'org.jetbrains.kotlin.jvm'
|
|
id 'org.jetbrains.kotlin.plugin.serialization'
|
|
}
|
|
|
|
ext {
|
|
ktor_version = '3.0.3'
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':core:inference')
|
|
implementation project(':core:events')
|
|
implementation project(':core:context')
|
|
implementation "io.ktor:ktor-client-core:$ktor_version"
|
|
implementation "io.ktor:ktor-client-cio:$ktor_version"
|
|
implementation "io.ktor:ktor-client-content-negotiation:$ktor_version"
|
|
implementation "io.ktor:ktor-serialization-kotlinx-json:$ktor_version"
|
|
implementation "org.slf4j:slf4j-api:2.0.16"
|
|
}
|
|
|
|
tasks.named("koverVerify").configure { enabled = false }
|