[PR #8407] [CLOSED] convert/test: migrate conversion tests to work with refactor #38573

Closed
opened 2026-04-22 23:14:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/8407
Author: @BruceMacD
Created: 1/14/2025
Status: Closed

Base: mainHead: brucemacd/convert-valid-tests


📝 Commits (2)

  • 4608302 convert/test: migrate conversion tests to work with refactor
  • 892763e format

📊 Changes

25 files changed (+846 additions, -1884 deletions)

View changed files

📝 convert/convert_test.go (+161 -52)
convert/testdata/Meta-Llama-3-8B-Instruct.json (+0 -313)
convert/testdata/Meta-Llama-3.1-8B-Instruct.json (+0 -3)
convert/testdata/Mistral-7B-Instruct-v0.2.json (+0 -313)
convert/testdata/Mixtral-8x7B-Instruct-v0.1.json (+0 -348)
convert/testdata/Phi-3-mini-128k-instruct.json (+0 -225)
convert/testdata/all-MiniLM-L6-v2.json (+0 -124)
convert/testdata/gemma-2-2b-it.json (+0 -312)
convert/testdata/gemma-2-9b-it.json (+0 -6)
convert/testdata/gemma-2b-it.json (+0 -188)
convert/testdata/llama3.1/config.json (+23 -0)
convert/testdata/llama3.1/expected.json (+19 -0)
convert/testdata/llama3.1/tensors.json (+19 -0)
convert/testdata/llama3.1/tokenizer.json (+46 -0)
convert/testdata/llama3.1/tokenizer_config.json (+10 -0)
convert/testdata/llama3/config.json (+23 -0)
convert/testdata/llama3/expected.json (+18 -0)
convert/testdata/llama3/tensors.json (+19 -0)
convert/testdata/llama3/tokenizer.json (+46 -0)
convert/testdata/llama3/tokenizer_config.json (+10 -0)

...and 5 more files

📄 Description

When conversion was refactored it broke all these tests, but they were silently skipping due to the wrong file names being checked for. This change refactors the valid model conversion test to highlight the important files and check for important details.

Draft to see if people are ok with this approach before adding the rest of the model conversion tests.

Related to: #4756


🔄 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/8407 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 1/14/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `brucemacd/convert-valid-tests` --- ### 📝 Commits (2) - [`4608302`](https://github.com/ollama/ollama/commit/4608302ad124ae3f69ee87e279a171f7a85b324c) convert/test: migrate conversion tests to work with refactor - [`892763e`](https://github.com/ollama/ollama/commit/892763e95144974a590a4f2b74fcf585b1af1256) format ### 📊 Changes **25 files changed** (+846 additions, -1884 deletions) <details> <summary>View changed files</summary> 📝 `convert/convert_test.go` (+161 -52) ➖ `convert/testdata/Meta-Llama-3-8B-Instruct.json` (+0 -313) ➖ `convert/testdata/Meta-Llama-3.1-8B-Instruct.json` (+0 -3) ➖ `convert/testdata/Mistral-7B-Instruct-v0.2.json` (+0 -313) ➖ `convert/testdata/Mixtral-8x7B-Instruct-v0.1.json` (+0 -348) ➖ `convert/testdata/Phi-3-mini-128k-instruct.json` (+0 -225) ➖ `convert/testdata/all-MiniLM-L6-v2.json` (+0 -124) ➖ `convert/testdata/gemma-2-2b-it.json` (+0 -312) ➖ `convert/testdata/gemma-2-9b-it.json` (+0 -6) ➖ `convert/testdata/gemma-2b-it.json` (+0 -188) ➕ `convert/testdata/llama3.1/config.json` (+23 -0) ➕ `convert/testdata/llama3.1/expected.json` (+19 -0) ➕ `convert/testdata/llama3.1/tensors.json` (+19 -0) ➕ `convert/testdata/llama3.1/tokenizer.json` (+46 -0) ➕ `convert/testdata/llama3.1/tokenizer_config.json` (+10 -0) ➕ `convert/testdata/llama3/config.json` (+23 -0) ➕ `convert/testdata/llama3/expected.json` (+18 -0) ➕ `convert/testdata/llama3/tensors.json` (+19 -0) ➕ `convert/testdata/llama3/tokenizer.json` (+46 -0) ➕ `convert/testdata/llama3/tokenizer_config.json` (+10 -0) _...and 5 more files_ </details> ### 📄 Description When conversion was refactored it broke all these tests, but they were silently skipping due to the wrong file names being checked for. This change refactors the valid model conversion test to highlight the important files and check for important details. Draft to see if people are ok with this approach before adding the rest of the model conversion tests. Related to: #4756 --- <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 2026-04-22 23:14:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#38573