[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
@@ -120,11 +120,14 @@ class TestDflashVerifyRunsMambaTrackHook(CustomTestCase):
|
||||
calls.append("init_new")
|
||||
return fake_forward_batch
|
||||
|
||||
with mock.patch(
|
||||
"sglang.srt.speculative.spec_utils.prepare_mamba_track_for_verify",
|
||||
side_effect=fake_hook,
|
||||
), mock.patch.object(
|
||||
dflash_info.ForwardBatch, "init_new", side_effect=fake_init_new
|
||||
with (
|
||||
mock.patch(
|
||||
"sglang.srt.speculative.spec_utils.prepare_mamba_track_for_verify",
|
||||
side_effect=fake_hook,
|
||||
),
|
||||
mock.patch.object(
|
||||
dflash_info.ForwardBatch, "init_new", side_effect=fake_init_new
|
||||
),
|
||||
):
|
||||
out, can_run_cuda_graph = self._spec_input().prepare_for_verify(
|
||||
batch, target_worker
|
||||
|
||||
@@ -231,12 +231,15 @@ class TestEagleWorkerV2BackendFallback(CustomTestCase):
|
||||
seq_lens=torch.ones((1,), dtype=torch.int32, device=DEVICE),
|
||||
)
|
||||
|
||||
with patch(
|
||||
"sglang.srt.speculative.eagle_worker_common.build_tree_kernel_efficient",
|
||||
return_value=tree_result,
|
||||
), patch(
|
||||
"sglang.srt.speculative.eagle_worker_v2.prepare_for_draft",
|
||||
return_value=(forward_batch, True),
|
||||
with (
|
||||
patch(
|
||||
"sglang.srt.speculative.eagle_worker_common.build_tree_kernel_efficient",
|
||||
return_value=tree_result,
|
||||
),
|
||||
patch(
|
||||
"sglang.srt.speculative.eagle_worker_v2.prepare_for_draft",
|
||||
return_value=(forward_batch, True),
|
||||
),
|
||||
):
|
||||
worker.draft(batch)
|
||||
|
||||
|
||||
@@ -194,12 +194,15 @@ class TestNgramMambaVerifyUpdate(CustomTestCase):
|
||||
dtype=torch.int32,
|
||||
)
|
||||
|
||||
with patch(
|
||||
"sglang.srt.speculative.spec_utils.mambaish_config",
|
||||
return_value={"some": "config"},
|
||||
), patch(
|
||||
"sglang.srt.speculative.spec_utils.mamba_track_grid",
|
||||
return_value=256,
|
||||
with (
|
||||
patch(
|
||||
"sglang.srt.speculative.spec_utils.mambaish_config",
|
||||
return_value={"some": "config"},
|
||||
),
|
||||
patch(
|
||||
"sglang.srt.speculative.spec_utils.mamba_track_grid",
|
||||
return_value=256,
|
||||
),
|
||||
):
|
||||
commit_mamba_states_after_verify(
|
||||
target_worker,
|
||||
|
||||
Reference in New Issue
Block a user