Skip to content

Commit 7bcc5af

Browse files
author
Olivier Chafik
committed
fix pyright lints in tool_bench.py
1 parent 0b5d105 commit 7bcc5af

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

scripts/tool_bench.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
1010
cmake -B build -DLLAMA_CURL=1 && cmake --build build --config Release -j -t llama-server
1111
12+
export LLAMA_SERVER_BIN_PATH=$PWD/build/bin/llama-server
13+
export LLAMA_CACHE=${LLAMA_CACHE:-$HOME/Library/Caches/llama.cpp}
14+
1215
./scripts/tool_bench.py run --n 30 --temp -1 --temp 0 --temp 1 --model "Qwen 2.5 1.5B Q4_K_M" --output qwen1.5b.jsonl --hf bartowski/Qwen2.5-1.5B-Instruct-GGUF --ollama qwen2.5:1.5b-instruct-q4_K_M
1316
./scripts/tool_bench.py run --n 30 --temp -1 --temp 0 --temp 1 --model "Qwen 2.5 Coder 7B Q4_K_M" --output qwenc7b.jsonl --hf bartowski/Qwen2.5-Coder-7B-Instruct-GGUF --ollama qwen2.5-coder:7b
1417
@@ -48,8 +51,8 @@
4851

4952
sys.path.insert(0, Path(__file__).parent.parent.as_posix())
5053
if True:
51-
from examples.server.tests.utils import ServerProcess # type: ignore
52-
from examples.server.tests.unit.test_tool_call import TIMEOUT_SERVER_START, do_test_calc_result, do_test_hello_world, do_test_weather # type: ignore
54+
from examples.server.tests.utils import ServerProcess
55+
from examples.server.tests.unit.test_tool_call import TIMEOUT_SERVER_START, do_test_calc_result, do_test_hello_world, do_test_weather
5356

5457

5558
@contextmanager
@@ -169,9 +172,9 @@ def plot(files: List[Path], output: Optional[Path] = None, test_regex: Optional[
169172
]
170173
matrix.append(row_vals)
171174

172-
columns = [f"{server_name}\n{test}" for server_name, test in all_cols]
175+
columns: list[str] = [f"{server_name}\n{test}" for server_name, test in all_cols]
173176

174-
df = pd.DataFrame(matrix, index=index, columns=columns)
177+
df = pd.DataFrame(matrix, index=np.array(index), columns=np.array(columns))
175178

176179
plt.figure(figsize=(12, 6))
177180

scripts/tool_bench.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ set -euo pipefail
33

44
cmake --build build -j
55

6-
# Useful for ollama
7-
# export LLAMA_SERVER_TEST_REQUEST_RETRIES=${RETRIES:-3}
8-
96
export LLAMA_CACHE=${LLAMA_CACHE:-$HOME/Library/Caches/llama.cpp}
107
export LLAMA_SERVER_BIN_PATH=$PWD/build/bin/llama-server
118

0 commit comments

Comments
 (0)