Skip to content

Conversation

@ParamThakkar123
Copy link
Contributor

@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
transformerlab/models/ollamamodel.py 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@dadmobile dadmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe explain to me what was happening and what you changed? I don't quite get this one but it would good to get this error fixed!

@ParamThakkar123
Copy link
Contributor Author

Maybe explain to me what was happening and what you changed? I don't quite get this one but it would good to get this error fixed!

For this issue the api was giving the following error in the terminal everytime we import a model, even if ollama is not installed.

The app is trying to look for ollama models even if you don't have Ollama installed when you click on Import Models in the Model Zoo.

Failed to locate Ollama models library:
[Errno 2] No such file or directory: 'Ollama models directory'

The try catch probably doesn't account for this case or maybe it does but still gives this error

Copy link
Member

@dadmobile dadmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK no wait I take back my approval. I don't have OLLAMA_MODELS set in my environment and I have Ollama installed! I think we need a different thing to check for?

I'm not sure of the best way. Maybe check if shutil.which("ollama") isn't None?

Or do the thing Deep said and catch the specific error? I'm not sure which is better but this one doesn't work for me.

@ParamThakkar123
Copy link
Contributor Author

Sure I will delete it

Copy link
Member

@deep1401 deep1401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving on my end as the change I requested was added

@aliasaria
Copy link
Member

@dadmobile to approve

@ParamThakkar123 ParamThakkar123 merged commit ae6a544 into main Nov 13, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal error if you try to import models and don't have Ollama installed

5 participants