MCPcopy
hub / github.com/mudler/LocalAI / stopLoadProcess

Function stopLoadProcess

pkg/model/initializers.go:196–204  ·  view source on GitHub ↗

stopLoadProcess tears down a backend process whose load did not complete. The stop error is only logged: the load error is what the caller reports.

(client *Model, modelID string)

Source from the content-addressed store, hash-verified

194// stopLoadProcess tears down a backend process whose load did not complete.
195// The stop error is only logged: the load error is what the caller reports.
196func stopLoadProcess(client *Model, modelID string) {
197 process := client.Process()
198 if process == nil {
199 return
200 }
201 if err := process.Stop(); err != nil {
202 xlog.Warn("failed to stop backend process after failed load", "error", err, "modelID", modelID)
203 }
204}
205
206// parallelSlotsFromOptions returns the effective n_parallel from the backend
207// option strings ("parallel:N" / "n_parallel:N"), or "1" when unset — the

Callers 1

spawnGRPCModelMethod · 0.85

Calls 2

ProcessMethod · 0.80
StopMethod · 0.65

Tested by

no test coverage detected