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

Function recordModelLoadFailure

core/backend/options.go:56–70  ·  view source on GitHub ↗

recordModelLoadFailure records a backend trace when model loading fails.

(appConfig *config.ApplicationConfig, modelName, backend string, err error, data map[string]any)

Source from the content-addressed store, hash-verified

54
55// recordModelLoadFailure records a backend trace when model loading fails.
56func recordModelLoadFailure(appConfig *config.ApplicationConfig, modelName, backend string, err error, data map[string]any) {
57 if !appConfig.EnableTracing {
58 return
59 }
60 trace.InitBackendTracingIfEnabled(appConfig.TracingMaxItems, appConfig.TracingMaxBodyBytes)
61 trace.RecordBackendTrace(trace.BackendTrace{
62 Timestamp: time.Now(),
63 Type: trace.BackendTraceModelLoad,
64 ModelName: modelName,
65 Backend: backend,
66 Summary: "Model load failed",
67 Error: err.Error(),
68 Data: data,
69 })
70}
71
72// estimateModelSizeBytes uses the unified EstimateModel entry point to compute
73// the total weight-file size for a model config. It collects all weight files

Callers 15

DetectionFunction · 0.85
FaceEmbedFunction · 0.85
VoiceEmbedFunction · 0.85
VADFunction · 0.85
ModelScoreFunction · 0.85
ModelAudioTransformFunction · 0.85
loadDiarizationModelFunction · 0.85
ImageGenerationFunction · 0.85
SoundGenerationFunction · 0.85
RerankFunction · 0.85
ModelTTSFunction · 0.85

Calls 3

RecordBackendTraceFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected