aidatatools / ollama-benchmark

LLM Benchmark for Throughput via Ollama (Local LLMs)
https://llm.aidatatools.com/
MIT License
64 stars 13 forks source link

Add check for required package lsb-core on linux #5

Closed felixboettger closed 2 months ago

felixboettger commented 2 months ago

In the systeminfo module, lsb_release may be called as a subprocess. The lsb_release command is part of the lsb-core package, which is not installed by default on some distributions. This causes the benchmark to fail with TypeError: 'NoneType' object is not subscriptable.

Consider adding a try-catch block:

try:  
    r2 = subprocess.run(['lsb_release','-a'],capture_output=True,text=True)   
except Exception as e:     
    print("lsb-core is required")     
chuangtc commented 2 months ago

Could you try to install llm-benchmark with the following command on your Debian Linux?

pip install llm-benchmark==0.3.15

And see if this resolves your issues? Thank you.

felixboettger commented 2 months ago

Can confirm the issue is fixed in 0.3.15!