[PR #12371] fix: create with nested directories #12537

Open
opened 2025-11-12 16:38:14 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12371
Author: @mxyng
Created: 9/22/2025
Status: 🔄 Open

Base: mxyng/expand-pathHead: mxyng/fix-create


📝 Commits (2)

📊 Changes

18 files changed (+811 additions, -837 deletions)

View changed files

📝 api/types.go (+29 -4)
📝 api/types_test.go (+1 -1)
📝 cmd/cmd.go (+0 -176)
cmd/create.go (+453 -0)
cmd/create_test.go (+258 -0)
📝 cmd/interactive.go (+1 -1)
📝 parser/parser.go (+6 -332)
📝 parser/parser_test.go (+0 -220)
📝 server/create.go (+17 -17)
📝 server/create_test.go (+4 -4)
📝 server/routes_create_test.go (+24 -26)
📝 server/routes_debug_test.go (+2 -2)
📝 server/routes_delete_test.go (+2 -2)
📝 server/routes_generate_test.go (+5 -5)
📝 server/routes_harmony_streaming_test.go (+3 -3)
📝 server/routes_list_test.go (+1 -1)
📝 server/routes_test.go (+5 -5)
types/syncmap/syncmap.go (+0 -38)

📄 Description

specifically models with a nested config.json will mangle the top level config.json. this introduces a race that produces an error when the nested config.json is written after the top level config.json.

this also fixes the issue with embedding models where 1_Pooling/config.json could not be read since they get written out as config.json


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/12371 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 9/22/2025 **Status:** 🔄 Open **Base:** `mxyng/expand-path` ← **Head:** `mxyng/fix-create` --- ### 📝 Commits (2) - [`b846eac`](https://github.com/ollama/ollama/commit/b846eacf42ba4092ee2619f890ab6e408ed8c348) fix: create with nested directories - [`ffaf2e7`](https://github.com/ollama/ollama/commit/ffaf2e79167c36273b38efdee1b506fe32276e50) update tests ### 📊 Changes **18 files changed** (+811 additions, -837 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+29 -4) 📝 `api/types_test.go` (+1 -1) 📝 `cmd/cmd.go` (+0 -176) ➕ `cmd/create.go` (+453 -0) ➕ `cmd/create_test.go` (+258 -0) 📝 `cmd/interactive.go` (+1 -1) 📝 `parser/parser.go` (+6 -332) 📝 `parser/parser_test.go` (+0 -220) 📝 `server/create.go` (+17 -17) 📝 `server/create_test.go` (+4 -4) 📝 `server/routes_create_test.go` (+24 -26) 📝 `server/routes_debug_test.go` (+2 -2) 📝 `server/routes_delete_test.go` (+2 -2) 📝 `server/routes_generate_test.go` (+5 -5) 📝 `server/routes_harmony_streaming_test.go` (+3 -3) 📝 `server/routes_list_test.go` (+1 -1) 📝 `server/routes_test.go` (+5 -5) ➖ `types/syncmap/syncmap.go` (+0 -38) </details> ### 📄 Description specifically models with a nested config.json will mangle the top level config.json. this introduces a race that produces an error when the nested config.json is written after the top level config.json. this also fixes the issue with embedding models where 1_Pooling/config.json could not be read since they get written out as config.json --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-12 16:38:14 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#12537