From 6af3f95f6fda61329260c9731697cc368cf05d97 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Wed, 20 Nov 2024 17:58:14 +0100 Subject: [PATCH] fix coding style --- examples/server/tests/unit/test_rerank.py | 2 +- examples/server/tests/unit/test_slot_save.py | 2 +- examples/server/tests/utils.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/server/tests/unit/test_rerank.py b/examples/server/tests/unit/test_rerank.py index 7ba4580e6..3a49fd3ac 100644 --- a/examples/server/tests/unit/test_rerank.py +++ b/examples/server/tests/unit/test_rerank.py @@ -24,7 +24,7 @@ def test_rerank(): }) assert res.status_code == 200 assert len(res.body["results"]) == 4 - + most_relevant = res.body["results"][0] least_relevant = res.body["results"][0] for doc in res.body["results"]: diff --git a/examples/server/tests/unit/test_slot_save.py b/examples/server/tests/unit/test_slot_save.py index c00cc7102..68249b0be 100644 --- a/examples/server/tests/unit/test_slot_save.py +++ b/examples/server/tests/unit/test_slot_save.py @@ -47,7 +47,7 @@ def test_slot_save_restore(): }) assert res.status_code == 200 assert res.body["n_restored"] == 84 - + # Since we have cache, slot 0 should only process the last tokens res = server.make_request("POST", "/completion", data={ "prompt": "What is the capital of Germany?", diff --git a/examples/server/tests/utils.py b/examples/server/tests/utils.py index dadabf9f2..03e0a4a97 100644 --- a/examples/server/tests/utils.py +++ b/examples/server/tests/utils.py @@ -292,7 +292,7 @@ class ServerPreset: server.temperature = 0.0 server.seed = 42 return server - + @staticmethod def stories15m_moe() -> ServerProcess: server = ServerProcess() @@ -306,7 +306,7 @@ class ServerPreset: server.temperature = 0.0 server.seed = 42 return server - + @staticmethod def jina_reranker_tiny() -> ServerProcess: server = ServerProcess()