Skip to content

Commit 7f97e39

Browse files
committed
client = ollama.Client(host=http://127.0.0.1:11434) client.pull(model_name)
1 parent ffac4c9 commit 7f97e39

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

llm_benchmark/check_models.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ def pull_models(models_file_path):
4646
for x in models_dict['models']:
4747
model_name = x['model']
4848
print(model_name)
49-
result = subprocess.run(['ollama', 'pull', model_name], stdout=subprocess.PIPE)
50-
result.stdout
49+
try:
50+
result = subprocess.run(['ollama', 'pull', model_name], stdout=subprocess.PIPE)
51+
result.stdout
52+
except:
53+
client = ollama.Client(host='http://127.0.0.1:11434')
54+
client.pull(model_name)
5155

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "llm_benchmark"
3-
version = "0.4.5"
3+
version = "0.4.6"
44
description = "LLM Benchmark for Throughputs via Ollama"
55
authors = ["Jason Chuang <[email protected]>"]
66
license = "MIT"
@@ -17,7 +17,7 @@ keywords = [
1717
[tool.poetry.dependencies]
1818
python = "^3.9"
1919
typer = {extras = ["all"], version = "^0.9.0"}
20-
ollama = "^0.1.8"
20+
ollama = "^0.4.8"
2121
pyyaml = "^6.0.1"
2222
requests = "^2.32.3"
2323
psutil = "^5.9.8"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ lib-platform==1.2.10
1616
lib-registry==2.0.10
1717
markdown-it-py==3.0.0
1818
mdurl==0.1.2
19-
ollama==0.1.8
19+
ollama==0.4.8
2020
psutil==5.9.8
2121
Pygments==2.17.2
2222
PyYAML==6.0.1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name='llm_benchmark',
8-
version='0.4.5',
8+
version='0.4.6',
99
author='Jason Chuang',
1010
author_email='[email protected]',
1111
description='LLM Benchmark',

0 commit comments

Comments
 (0)