MCPcopy Create free account
hub / github.com/mudler/LocalAI / GetLoadingCount

Method GetLoadingCount

pkg/model/loader.go:104–108  ·  view source on GitHub ↗

GetLoadingCount returns the number of models currently being loaded

()

Source from the content-addressed store, hash-verified

102
103// GetLoadingCount returns the number of models currently being loaded
104func (ml *ModelLoader) GetLoadingCount() int {
105 ml.mu.Lock()
106 defer ml.mu.Unlock()
107 return len(ml.loading)
108}
109
110// OnModelUnload registers a hook that is called when a model is unloaded.
111func (ml *ModelLoader) OnModelUnload(hook ModelUnloadHook) {

Callers 2

enforceLRULimitMethod · 0.95
loader_test.goFile · 0.80

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected