Unverified Commit 4dcf5c3e authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

Merge pull request #349 from jmorganca/close-files

close open files
parents d1b2f532 e26085b9
......@@ -39,6 +39,7 @@ func initBackend() error {
if err != nil {
return err
}
defer actual.Close()
actualSum := sha256.New()
if _, err := io.Copy(actualSum, actual); err != nil {
......
......@@ -28,6 +28,7 @@ func New(model string, adapters []string, opts api.Options) (LLM, error) {
if err != nil {
return nil, err
}
defer f.Close()
ggml, err := DecodeGGML(f, ModelFamilyLlama)
if err != nil {
......
......@@ -1117,6 +1117,7 @@ func uploadBlobChunked(ctx context.Context, mp ModelPath, url string, layer *Lay
if err != nil {
return err
}
defer f.Close()
totalUploaded := 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment