Pull requests / #2919
#2919 fix(bench): set port again when the bench starts the server
open · draft · @ByteJuggler · 0 コメント · GitHub で見る
本文
\`tools/strata_bench.py\` stops with \`NameError: name 'port' is not defined\` whenever it has to start the server itself, which is the default for \`BENCH.bat\` / \`bench.sh\` when no server is running yet:
\`\`\`
File "tools/strata_bench.py", line 1007, in main
if port_answers(port):
NameError: name 'port' is not defined
\`\`\`
#2330 changed the address line to \`base = server_base(cfg.get("host"), a.port or int(cfg.get("port", 8080)))\` and dropped the \`port = ...\` line before it. \`port\` is still used afterwards: in the port-in-use check, the messages and \`start_server(cfg_path, port, ...)\`.
The fix sets \`port\` again and passes it to \`server_base\`. One line; no change when a server is already running or \`--url\` is given.
Tested: \`python tools/test_strata_bench.py\` passes (17 tests), and \`strata_bench.py --config ...\` with no server running now starts the server and completes the suite (Windows, HIP, six models).関連リンク
インストール・モデル・リリースへの站内リンク。