Skip to content

Commit

Permalink
Always delete process
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
  • Loading branch information
mudler committed Nov 26, 2023
1 parent 41fd3ef commit de1abfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/model/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ func (ml *ModelLoader) ShutdownModel(modelName string) error {
}

func (ml *ModelLoader) StopModel(modelName string) error {
defer ml.deleteProcess(modelName)
if _, ok := ml.models[modelName]; !ok {
return fmt.Errorf("model %s not found", modelName)
}

return ml.deleteProcess(modelName)
return nil
//return ml.deleteProcess(modelName)
}

func (ml *ModelLoader) CheckIsLoaded(s string) ModelAddress {
Expand Down

0 comments on commit de1abfc

Please sign in to comment.