[CI][RFC] Replace black-jupyter with ruff-format (#37210)
Co-authored-by: Alison Shao <a.shao@wustl.edu>
This commit is contained in:
co-authored by
Alison Shao
parent
2641e427be
commit
28262c20df
@@ -20,9 +20,9 @@ def _drain_flush_then_assert_no_kv_leak(t: ScriptedContext, baseline: dict):
|
||||
t.flush_cache()
|
||||
yield
|
||||
final = t.engine_stats()
|
||||
assert (
|
||||
final["kv_pool_free"] >= baseline["kv_pool_free"]
|
||||
), f"KV leak: {baseline['kv_pool_free']} -> {final['kv_pool_free']}"
|
||||
assert final["kv_pool_free"] >= baseline["kv_pool_free"], (
|
||||
f"KV leak: {baseline['kv_pool_free']} -> {final['kv_pool_free']}"
|
||||
)
|
||||
|
||||
|
||||
class TestMultiReqBasic(ScriptedTestCase):
|
||||
@@ -39,9 +39,9 @@ class TestMultiReqBasic(ScriptedTestCase):
|
||||
yield
|
||||
|
||||
assert r1.is_chunking, "r1 should still be chunking"
|
||||
assert (
|
||||
not r2.is_chunking
|
||||
), "r2 must wait for r1's chunk loop to clear before chunking"
|
||||
assert not r2.is_chunking, (
|
||||
"r2 must wait for r1's chunk loop to clear before chunking"
|
||||
)
|
||||
|
||||
yield from run_until_all_finished([r1, r2])
|
||||
assert r1.finished and r2.finished
|
||||
@@ -144,9 +144,9 @@ class TestMultiReqBasic(ScriptedTestCase):
|
||||
r2 = t.start_req(prompt_len=VERY_LONG_PROMPT_LEN + 8, max_new_tokens=2)
|
||||
yield from run_until_finished(r2)
|
||||
assert r1.finished and r2.finished
|
||||
assert (
|
||||
r2.chunks_done < r1.chunks_done
|
||||
), "r2 reuses r1's cached prefix, so it should chunk fewer times"
|
||||
assert r2.chunks_done < r1.chunks_done, (
|
||||
"r2 reuses r1's cached prefix, so it should chunk fewer times"
|
||||
)
|
||||
|
||||
def test_trickle_per_yield_50(self):
|
||||
self.server.execute_script(self._script_trickle_per_yield_50)
|
||||
|
||||
Reference in New Issue
Block a user