Skip to content

Commit fe6968f

Browse files
author
ochafik
committed
nits
1 parent 596ff7f commit fe6968f

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

examples/server/tests/utils.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ def start(self, timeout_seconds: int | None = DEFAULT_HTTP_TIMEOUT) -> None:
194194
self.process = subprocess.Popen(
195195
[str(arg) for arg in [server_path, *server_args]],
196196
creationflags=flags,
197-
# stdout=subprocess.DEVNULL,
198-
# stderr=subprocess.DEVNULL,
199197
stdout=sys.stdout,
200198
stderr=sys.stdout,
201199
env={**os.environ, "LLAMA_CACHE": "tmp"} if "LLAMA_CACHE" not in os.environ else None,
@@ -241,7 +239,6 @@ def make_request(
241239
timeout: float | None = None,
242240
) -> ServerResponse:
243241
url = f"http://{self.server_host}:{self.server_port}{path}"
244-
# print(f"#\ncurl {url} -d '{json.dumps(data, indent=2)}'\n")
245242
parse_body = False
246243
if method == "GET":
247244
response = requests.get(url, headers=headers, timeout=timeout)
@@ -253,17 +250,13 @@ def make_request(
253250
response = requests.options(url, headers=headers, timeout=timeout)
254251
else:
255252
raise ValueError(f"Unimplemented method: {method}")
256-
257-
if (response is None or response.status_code != 200) and remaining_attempts > 0:
258-
continue
259253
result = ServerResponse()
260254
result.headers = dict(response.headers)
261255
result.status_code = response.status_code
262256
result.body = response.json() if parse_body else None
263-
# print("Response from server", json.dumps(result.body, indent=2))
257+
print("Response from server", json.dumps(result.body, indent=2))
264258
return result
265259

266-
267260
def make_stream_request(
268261
self,
269262
method: str,

scripts/tool_bench.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ export ARGS=(
6666

6767
for f in ../*.jsonl; do
6868
./scripts/tool_bench.py plot "$f" --output ${f%.jsonl}.png || true
69-
done
69+
done

0 commit comments

Comments
 (0)